jquery / jquery/jquery-mousewheel
Please make non-passive event listeners
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.9k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I believe I'm seeing a warning error in Google Chrome saying:
[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
This is pointing to the following code line: https://github.com/jquery/jquery-mousewheel/blob/fcb425e872c5b1eb45cbc4c8a5dcf4865b991bab/jquery.mousewheel.js#L40
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at jquery.mousewheel.js line 40, where the wheel event listener is identified as triggering Chrome's non-passive listener warning. Review the listener registration and verify that the warning is gone while mouse-wheel behavior remains intact in Chrome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100