Dennis Hernández 10 年之前
父节点
当前提交
745898dc6f
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/bootstrap-table.js

+ 4 - 3
src/bootstrap-table.js

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