浏览代码

HUE-3781 [home] Drag and drop a document into the assist database list gives a maximum call stack JS error

Johan Ahlen 9 年之前
父节点
当前提交
a573326
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      desktop/core/src/desktop/static/desktop/js/jquery.nicescroll.js

+ 3 - 3
desktop/core/src/desktop/static/desktop/js/jquery.nicescroll.js

@@ -1614,6 +1614,7 @@
 
 
           } else {
           } else {
 
 
+            var properDebounce = -1;
             var checkSelectionScroll = function(e) {
             var checkSelectionScroll = function(e) {
               if (!self.selectiondrag) return;
               if (!self.selectiondrag) return;
 
 
@@ -1629,9 +1630,8 @@
               var rt = -Math.floor(self.selectiondrag.df / 6) * 2;
               var rt = -Math.floor(self.selectiondrag.df / 6) * 2;
               self.doScrollBy(rt);
               self.doScrollBy(rt);
 
 
-              self.debounced("doselectionscroll", function() {
-                checkSelectionScroll();
-              }, 50);
+              window.clearTimeout(properDebounce);
+              properDebounce = window.setTimeout(checkSelectionScroll, 50);
             };
             };
 
 
             if ("getSelection" in document) { // A grade - Major browsers
             if ("getSelection" in document) { // A grade - Major browsers