mirror of https://github.com/ElemeFE/element
Table: Add eventListener option passive
parent
0d952b7917
commit
8d15a86df2
|
@ -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 });
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue