-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Avoid to have to wait to zoom after scrolling #17724
Conversation
Do we actually have to care about such browsers, or could we perhaps take the opportunity to simplify the affected code? Looking at the MDN compatibility data it seems that almost all modern browsers already support this. The only exception is unsurprisingly Safari, which has always been the "worst" browser to attempt to support. (Historically it's often been quite slow at implementing new web-platform features, and over time we've seen a large number issues that only affect Safari.) |
I mostly added this extra code because of: |
655815e
to
48f590b
Compare
My reasoning for removing the old code is:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we also need to ensure that the new event listeners are removed on "blur" for the mainContainer
, and also reset this._isScrolling = false;
then?
Yes it's possible, but you've to alt+tab during scrolling: it's very unlikely to happen... That said I'll fix that. |
48f590b
to
c860b3b
Compare
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/5d021967e95770e/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/5d021967e95770e/output.txt Total script time: 1.20 mins Published |
Having tested the preview there's unfortunately cases where the "scrollend" event doesn't seem to fire as expected, or possibly there's an extra "scroll"-event at the end of scrolling, which means that mouse-wheel zooming breaks.
|
c860b3b
to
e050f1f
Compare
It's a Firefox bug: |
Nice find, thanks for filing that!
Should we perhaps wait a couple of days, to see if there's a quick fix for the upstream bug, before landing a work-around? |
Allow to zoom with the wheel once the scrolling is finished. It's now possible to know that thanks to the scrollend event. Fixes mozilla#17707.
e050f1f
to
9e042e7
Compare
This bug is very likely there for a long time (I tested with a 2020 version) so I'm pretty sure that we won't have a fix soon (except maybe if it's easy enough to fix). So I think we should merge this PR (if everything is ok of course) and we can remove the workaround once it's fixed. |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/b6d7c722fb8f775/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/b6d7c722fb8f775/output.txt Total script time: 1.33 mins Published |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, now it seems to work in all cases I've tested; thank you!
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.
Fixes #17707.