Skip to content

Commit

Permalink
Fix: Compatiblity issue with jQuery 1.x when scrollCollapse is used a…
Browse files Browse the repository at this point in the history
…nd 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
  • Loading branch information
AllanJard committed Jan 4, 2019
1 parent 3520ef6 commit 30d4ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/dataTables.scroller.js
Expand Up @@ -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
Expand Down

0 comments on commit 30d4ac4

Please sign in to comment.