Skip to content

Commit c9130c3

Browse files
authored
feat(mousewheel): support for swiper-no-mousewheel ignore class (#6671)
* Ignore scroll events based on swiper-no-mousewheel class * Revert "Ignore scroll events based on swiper-no-mousewheel class" This reverts commit c34ee01. * Ignore scroll events based on swiper-no-mousewheel class
1 parent 7340629 commit c9130c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/mousewheel/mousewheel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ export default function Mousewheel({ swiper, extendParams, on, emit }) {
176176
let e = event;
177177
let disableParentSwiper = true;
178178
if (!swiper.enabled) return;
179+
180+
// Ignore event if the target or its parents have the swiper-no-mousewheel class
181+
if (event.target.closest(".swiper-no-mousewheel")) return;
182+
179183
const params = swiper.params.mousewheel;
180184

181185
if (swiper.params.cssMode) {

0 commit comments

Comments
 (0)