Skip to content

Commit

Permalink
Fix toTop/toBottom scrolling buttons (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Seifert <stefanseifert@users.noreply.github.com>
  • Loading branch information
mpankratiev and stefanseifert authored Apr 10, 2024
1 parent 50ecfcc commit 1915cb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,12 @@
};

that.toBottom = function() {
$document.find("html, body").animate({scrollTop: document.body.scrollHeight});
var $content = $document.find('coral-shell-content');
$content.animate({scrollTop: $content[0].scrollHeight});
};

that.toTop = function() {
$document.find("html, body").animate({scrollTop: 0});
$document.find('coral-shell-content').animate({scrollTop: 0});
};

/**
Expand Down
3 changes: 3 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<action type="update" dev="sseifert">
Switch to AEM 6.5.17 as minimum version.
</action>
<action type="fix" dev="mpankratiev" issue="32">
Fix toTop/toBottom scrolling buttons.
</action>
</release>

<release version="1.15.8" date="2023-11-22">
Expand Down

0 comments on commit 1915cb7

Please sign in to comment.