Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mousewheel: Add passive listeners for mousewheel #6452

Closed
6 tasks done
Davi-T opened this issue Mar 2, 2023 · 1 comment · May be fixed by #6646
Closed
6 tasks done

Mousewheel: Add passive listeners for mousewheel #6452

Davi-T opened this issue Mar 2, 2023 · 1 comment · May be fixed by #6646

Comments

@Davi-T
Copy link

Davi-T commented Mar 2, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://swiperjs.com/demos/270-mousewheel-control/core

Bug description

Chrome shows passive events violation when mouse wheel is enabled and notice it's not there in the source (but looks like it's added to other events)

Can we add in pretty please?

Thanks so much!

Expected Behavior

No violation warning

Actual Behavior

CHROME > [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive

Swiper version

9.1.0

Platform/Target and Browser Versions

Chrome 110.0.5481.100

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@nolimits4web
Copy link
Owner

No, we can not. Passive listeners don't allow preventDefault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants