-
-
Notifications
You must be signed in to change notification settings - Fork 829
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
web: Do not scroll the page when mouse wheel is handled in AVM2 #19029
base: master
Are you sure you want to change the base?
Conversation
Useful on Chromium-based browsers, where the modal is always displayed at the beginning.
This patch prevents scrolling the page when the users scrolls content inside the SWF (i.e. when the content somehow handles the scroll).
8daa672
to
5a374ce
Compare
This test verifies how scrolling works in AVM2 and whether the page is scrolled when it should be or not.
5a374ce
to
c51d1f5
Compare
Oh no this is going to bring up the "where's the line" debate again :D This does not match Flash's behaviour, AS3 mouse wheel events explicitly do not prevent the page from scrolling. It was a known trick to use AVM1 for scroll wheel stuff, which did prevent scrolling. The linked page in original Flash does not prevent scrolling. basilisk_6fNf97b3K3.mp4 |
So... I tested this a bit more, and I originally did tests with default params and assumed the result is always the same. Turns out the mouse wheel is trapped only when |
Is this FP behavior consistent across browsers and platforms? 🤔 |
Turns out this behavior differed across browsers and varied in time. We had a discussion about it on Discord, and I guess the bottom line was not to follow Flash Player in this regard. Pasting some links from @n0samu: |
This patch prevents scrolling the page when the users scrolls content inside the SWF (i.e. when the content somehow handles the scroll).
Based on my testing this behavior is a lot smarter than Flash originally had, because Flash just trapped mouse wheel events. We might want to add an option to simulate this behavior too in the future.
You can easily test the behavior here: https://www.newgrounds.com/portal/view/922049.