Skip to content

Commit

Permalink
Merge pull request #5620 from avalonmediasystem/footer-overlap-fix
Browse files Browse the repository at this point in the history
Re-set space between main content and footer on resize
  • Loading branch information
Dananji authored Feb 2, 2024
2 parents 5b5c55b + 8f459e5 commit c68131f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/assets/javascripts/avalon.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ $(document).ready(function () {
// Set CSS to push the page content above footer
$('.content-wrapper').css('padding-bottom', $('#footer').css('height'));

// Re-set the space between content-wrapper and footer on window resize.
// With this the main content height is adjusted when orientation changes when
// using mobile devices, avoiding main content bleeding into the footer.
window.addEventListener("resize", () => {
$('.content-wrapper').css('padding-bottom', $('#footer').css('height'));
}, true);


/* Toggle CSS classes for global search form */
const $searchWrapper = $('.global-search-wrapper');
const $searchSubmit = $('.global-search-submit');
Expand Down

0 comments on commit c68131f

Please sign in to comment.