Skip to content

Commit

Permalink
16c563b8966ad05c8c67450865cd26d7aa0436f5 Fix: Dropup wasn't working w…
Browse files Browse the repository at this point in the history
…hen in an offset parent with a low position top

https://datatables.net/forums/discussion/79861

Sync to source repo @16c563b8966ad05c8c67450865cd26d7aa0436f5
  • Loading branch information
dtbuild committed Sep 18, 2024
1 parent 54b3af8 commit 253b8b6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
],
"src-repo": "http://github.com/DataTables/Buttons",
"last-tag": "3.1.2",
"last-sync": "e4bc9e36c967a8db99affbe39d9f1144b25b6769"
"last-sync": "16c563b8966ad05c8c67450865cd26d7aa0436f5"
}
2 changes: 1 addition & 1 deletion js/dataTables.buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ $.extend(Buttons.prototype, {
popoverSizes.marginBottom;
}

if (containerPosition.top + top < $(window).scrollTop()) {
if (offsetParent.offset().top + top < $(window).scrollTop()) {
// Correction for when the top is beyond the top of the page
top = buttonPosition.top + hostNode.outerHeight();
}
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.buttons.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.buttons.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.buttons.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ $.extend(Buttons.prototype, {
popoverSizes.marginBottom;
}

if (containerPosition.top + top < $(window).scrollTop()) {
if (offsetParent.offset().top + top < $(window).scrollTop()) {
// Correction for when the top is beyond the top of the page
top = buttonPosition.top + hostNode.outerHeight();
}
Expand Down

0 comments on commit 253b8b6

Please sign in to comment.