Skip to content

Commit

Permalink
fix(wheel): Adding an active listener (nolimits4web#6452)
Browse files Browse the repository at this point in the history
  • Loading branch information
TakNePoidet committed May 4, 2023
1 parent 5a5ebb4 commit 89b5e1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/mousewheel/mousewheel.js
Expand Up @@ -395,9 +395,13 @@ export default function Mousewheel({ swiper, extendParams, on, emit }) {
if (swiper.params.mousewheel.eventsTarget !== 'container') {
targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget);
}
const activeListener = !swiper.params.passiveListeners
? { passive: false, capture: false }
: false;

targetEl[method]('mouseenter', handleMouseEnter);
targetEl[method]('mouseleave', handleMouseLeave);
targetEl[method]('wheel', handle);
targetEl[method]('wheel', handle, activeListener);
}

function enable() {
Expand Down

0 comments on commit 89b5e1b

Please sign in to comment.