Bladeren bron

Set the passive and capture flags.

NaotoshiFujita 3 jaren geleden
bovenliggende
commit
16de543dd6

+ 1 - 1
dist/js/splide.cjs.js

@@ -2143,7 +2143,7 @@ function Wheel(Splide2, Components2, options) {
   const { bind } = EventInterface(Splide2);
   function mount() {
     if (options.wheel) {
-      bind(Components2.Elements.track, "wheel", onWheel);
+      bind(Components2.Elements.track, "wheel", onWheel, { passive: false, capture: true });
     }
   }
   function onWheel(e) {

+ 1 - 1
dist/js/splide.esm.js

@@ -2139,7 +2139,7 @@ function Wheel(Splide2, Components2, options) {
   const { bind } = EventInterface(Splide2);
   function mount() {
     if (options.wheel) {
-      bind(Components2.Elements.track, "wheel", onWheel);
+      bind(Components2.Elements.track, "wheel", onWheel, { passive: false, capture: true });
     }
   }
   function onWheel(e) {

+ 4 - 1
dist/js/splide.js

@@ -2644,7 +2644,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
 
     function mount() {
       if (options.wheel) {
-        bind(Components2.Elements.track, "wheel", onWheel);
+        bind(Components2.Elements.track, "wheel", onWheel, {
+          passive: false,
+          capture: true
+        });
       }
     }
 

File diff suppressed because it is too large
+ 0 - 0
dist/js/splide.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/splide.min.js


BIN
dist/js/splide.min.js.gz


+ 1 - 1
src/js/components/Wheel/Wheel.ts

@@ -31,7 +31,7 @@ export function Wheel( Splide: Splide, Components: Components, options: Options
    */
   function mount(): void {
     if ( options.wheel ) {
-      bind( Components.Elements.track, 'wheel', onWheel );
+      bind( Components.Elements.track, 'wheel', onWheel, { passive: false, capture: true } );
     }
   }
 

Some files were not shown because too many files changed in this diff