From 30d4ac478c86e0c642cc93a1a5b3493ea19542b2 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 4 Jan 2019 11:50:49 +0000 Subject: [PATCH] Fix: Compatiblity issue with jQuery 1.x when scrollCollapse is used and the window forces the browser to scroll horizontally. - In that situation the height of the DataTables container would be the height of the scrollbar. jQuery 3.x doesn't use the scrollbar height, returning 0, while 1.x returned 15 (or whatever for your platform). - Solution is to remove jQuery there and just use clientHeight - DD-667 --- js/dataTables.scroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dataTables.scroller.js b/js/dataTables.scroller.js index a496b63..8e75c3b 100644 --- a/js/dataTables.scroller.js +++ b/js/dataTables.scroller.js @@ -286,7 +286,7 @@ $.extend( Scroller.prototype, { if ( heights.row ) { heights.viewport = $.contains(document, this.dom.scroller) ? - $(this.dom.scroller).height() : + this.dom.scroller.clientHeight : this._parseHeight($(this.dom.scroller).css('height')); // If collapsed (no height) use the max-height parameter