Dennis Hernández 10 years ago
parent
commit
745898dc6f
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/bootstrap-table.js

+ 4 - 3
src/bootstrap-table.js

@@ -1968,14 +1968,15 @@
         if (typeof value === 'number') {
             $tbody.scrollTop(value);
         }
-
-        if (typeof value === undefined) {
+        // Fix #786 bug getScrollPosition
+        if (value === undefined) {
             return $tbody.scrollTop();
         }
     };
 
     BootstrapTable.prototype.getScrollPosition = function () {
-        return this.scrollTo();
+        // Fix #786 bug getScrollPosition
+        return this.scrollTo(undefined);
     }
 
     BootstrapTable.prototype.selectPage = function (page) {