Skip to content

Commit

Permalink
refactor sticky_header script
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Jun 10, 2024
1 parent 3694bb6 commit 977b434
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion decidim-core/app/packs/src/decidim/sticky_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (stickyHeader) {
document.addEventListener("scroll", () => {
// if a subelement is not visible it has no offsetParent
const header = document.getElementById("main-bar").offsetParent;
if (header) {
if (header && window.getComputedStyle(stickyHeader).position === "fixed") {
let currentScroll = window.scrollY;
let goingDown = prevScroll > currentScroll;
let change = Math.abs(prevScroll - currentScroll);
Expand Down
2 changes: 0 additions & 2 deletions decidim-core/app/packs/stylesheets/decidim/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
footer {
@apply md:mb-0 lg:mb-0 #{!important};

.main-footer {
@apply bg-gray-4;

Expand Down

0 comments on commit 977b434

Please sign in to comment.