From c3357577966d52b938141153305b319137fe4185 Mon Sep 17 00:00:00 2001 From: rkatka Date: Tue, 9 Feb 2016 10:37:44 -0600 Subject: [PATCH] Update dataTables.scroller.js Resolves issue with NaN appearing in the table information display. Resolves issue with the scroller position jumping to the top while scrolling. May be related to https://github.com/DataTables/Scroller/issues/56 --- js/dataTables.scroller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/dataTables.scroller.js b/js/dataTables.scroller.js index 5ddd584..c6b99de 100644 --- a/js/dataTables.scroller.js +++ b/js/dataTables.scroller.js @@ -668,7 +668,11 @@ $.extend( Scroller.prototype, { this.s.topRowFloat = this.fnPixelsToRow( iScrollTop, false ); } - if ( iTopRow <= 0 ) { + if ( !isFinite(this.s.topRowFloat) ) { + this.s.topRowFloat = 0; + } + + if ( !isFinite(iTopRow) || iTopRow <= 0 ) { /* At the start of the table */ iTopRow = 0; }