Kaynağa Gözat

feat(handsontable): 取消阻止滚轮事件,并将版本进行回退处理

wupeixin 3 yıl önce
ebeveyn
işleme
e9f026d08a

+ 1 - 1
handsontable/package.json

@@ -10,7 +10,7 @@
     "url": "https://github.com/handsontable/handsontable/issues"
   },
   "author": "Handsoncode <hello@handsontable.com>",
-  "version": "6.3.17",
+  "version": "6.3.16",
   "browser": "dist/handsontable.js",
   "main": "commonjs/index.js",
   "module": "es/index.js",

+ 6 - 6
handsontable/src/3rdparty/walkontable/src/overlays.js

@@ -245,12 +245,12 @@ class Overlays {
           overlay = 'bottomLeft';
         }
 
-        // if ((overlay === 'top' && deltaY !== 0) ||
-        //   (overlay === 'left' && deltaX !== 0) ||
-        //   (overlay === 'bottom' && deltaY !== 0) ||
-        //   ((overlay === 'topLeft' || overlay === 'bottomLeft') && (deltaY !== 0 || deltaX !== 0))) {
-        //   event.preventDefault();
-        // }
+        if ((overlay === 'top' && deltaY !== 0) ||
+          (overlay === 'left' && deltaX !== 0) ||
+          (overlay === 'bottom' && deltaY !== 0) ||
+          ((overlay === 'topLeft' || overlay === 'bottomLeft') && (deltaY !== 0 || deltaX !== 0))) {
+          event.preventDefault();
+        }
       }]);
     }