Explorar o código

Table: Add eventListener option passive

Akiho Nagao %!s(int64=7) %!d(string=hai) anos
pai
achega
8d15a86df2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/table/src/util.js

+ 1 - 1
packages/table/src/util.js

@@ -96,7 +96,7 @@ const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowe
 
 export const mousewheel = function(element, callback) {
   if (element && element.addEventListener) {
-    element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', callback);
+    element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', callback, { passive: true });
   }
 };