From 16c563b8966ad05c8c67450865cd26d7aa0436f5 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 18 Sep 2024 08:48:19 +0000 Subject: [PATCH] Fix: Dropup wasn't working when in an offset parent with a low position top https://datatables.net/forums/discussion/79861 --- js/dataTables.buttons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dataTables.buttons.js b/js/dataTables.buttons.js index fdddf77f..b02bb2b7 100644 --- a/js/dataTables.buttons.js +++ b/js/dataTables.buttons.js @@ -1487,7 +1487,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(); }