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

Add passive: false when removing wheel listeners #11747

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Add passive: false when removing wheel listeners #11747

merged 1 commit into from
Mar 25, 2020

Conversation

gdh1995
Copy link
Contributor

@gdh1995 gdh1995 commented Mar 25, 2020

Code of listening wheel event uses {passive: false}, while this argument will be treated as true before Firefox 49, according to https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Browser_compatibility .

This commit adds it when removing wheel listeners, so that such listeners can be really removed.

This is a simple complement to #11736.

Code of listening `wheel` event uses `{passive: false}`,
while this argument will be treated as `true` before Firefox 49,
accordin to https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Browser_compatibility .

This commit adds it when removing wheel listeners,
so that such listeners can be really removed.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/4bc04b2e6b6daab/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/4bc04b2e6b6daab/output.txt

Total script time: 2.41 mins

Published

@timvandermeij
Copy link
Contributor

From https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener: "It's worth noting that some browser releases have been inconsistent on this, and unless you have specific reasons otherwise, it's probably wise to use the same values used for the call to addEventListener() when calling removeEventListener()."

So this should be fine. Thank you!

@timvandermeij timvandermeij merged commit ff0f9fd into mozilla:master Mar 25, 2020
@gdh1995 gdh1995 deleted the fix-removing-wheel branch March 26, 2020 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants