-
Notifications
You must be signed in to change notification settings - Fork 68
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
openstreetmap.org - Mouse wheel does not zoom into the page #73148
Comments
We appreciate your report. I was able to reproduce the issue. Using the scroll wheel does not zoom into the page: Tested with: Notes:
Moving this to NeedsDiagnosis for further investigations. |
I get the same behaviour in Chrome. Zoom in is possible only by clicking "Zoom in to edit" and by clicking +/- . Mouse wheel only scrolls down or up indeed. And if I use trackpad, it zooms in/out in both browsers. This is probably related to openstreetmap/iD#5550 @karlcow wonder if you get different behaviour between Chrome and Firefox? |
mouse wheel was zooming in and out in firefox 87, but not in firefox 88. In Chrome (Version 90.0.4430.212 (Official Build) (x86_64)), I get the correct behaviour (zoom in and out) |
Unfortunately I can't test this one, because I do not own a mouse 🐭
I seem to have a different behavior than @ksy36 here. Did you test on 88? or on 90? 😁 But if there is a difference in between Firefox 88 and Firefox 87, a mozregression would make it possible to reveal the issue.
|
@kaligrafy If you set in if you change |
This could be related to https://bugzilla.mozilla.org/show_bug.cgi?id=1392460 |
@karlcow setting dom.event.wheel-deltaMode-lines.disabled to false fixes the problem in firefox 88.0.1. |
@emilio so that's a regression of https://bugzilla.mozilla.org/show_bug.cgi?id=1392460 @wisniewskit On the side of the webcompat team, I wonder if we can create a site interventions for this. |
I think we should be able to, if there isn't an even better mechanism for it already. I'll investigate tomorrow. Let's file a bug if emilio agrees that an intervention is the way to go. |
ok the magic happens in https://www.openstreetmap.org/assets/id-cb3f7d4c3875433a329179a3b331e9fb5a67cbc5a7faf800ba072198b8c8472b.js also function defaultWheelDelta$1(e) {
return - e.deltaY * (1 === e.deltaMode ? 0.05 : e.deltaMode ? 1 : 0.002)
} |
|
@llacb47 ah cool and there are comments. |
So, if OSM reads |
Also, it's fixed on Nightly, right? |
@softvision-raul-bucata can you reproduce in nightly |
@karlcow I can still reproduce the issue on the latest build of Firefox Nightly, with all the settings in |
Hmm, it works for me on Nightly (Linux, FWIW) |
Maybe the codepath is different depending on the OS. I have seen things specific for macOS, but I didn't see anything obvious for windows.
so it is using |
Is there a temporary fix I can make to my id editor fork in the meantime? |
@kaligrafy did you have a chance to try on Firefox Nightly? (92.0a1 (2021-07-21) (64-bit) is the latest version?) @ksy36 did you reproduce on macOS or linux? |
The issue is still there on nightly. Sorry :-( |
Maybe it can help, but pressing the option key while using the mouse wheel in the id editor fixes the problem (it zooms instead of panning) |
The issue was that on mac os firefox, deltaX and deltaY were Integer values for both two finger moving and mouse scroll events. I've implemented a fix [hosted currently on iD dev endpoint] in iD to disable 'two finger panning' for mac os - firefox, but in general i would like to know the following: How to differentiate between mouse scroll and two finger movement on mac os firefox? |
@mbrzakovic That's a good question
I think we should probably provide an example for making it clear to people how this is all working. The function all of this doesn't give a very good story for interop. |
I'm confused at this reported issue. If returning pixels from delta values and delta mode on Firefox, it must have already been broken on Firefox on macOS (i.e., 87 or earlier) if user uses a mouse having high precision mouse wheel or the trackpad of Apple. And the function does not handle normal (expected) case first, so, I still don't understand what should be, and what's wrong... |
Ah, 88 is not the first release of the new wheel event... If this is reproducible only on macOS, does this affect the result? |
Generally making decisions about the source of an event based on whether the delta is an integer value or not seems pretty finicky... What guarantees that? |
It seems the code for the I'm trying to understand this part // Normalize mousewheel scroll speed (Firefox) - #3029
// If wheel delta is provided in LINE units, recalculate it in PIXEL units
// We are essentially redoing the calculations that occur here:
// https://github.com/d3/d3-zoom/blob/78563a8348aa4133b07cac92e2595c2227ca7cd7/src/zoom.js#L203
// See this for more info:
// https://github.com/basilfx/normalize-wheel/blob/master/src/normalizeWheel.js The line k = Math.max(k0, Math.min(k1, t.k * Math.pow(2, -event.deltaY * (event.deltaMode ? 120 : 1) / 500))), and the more info points to a code from Facebook from 2015, Facebook, Inc. not adjuster since June 2016. The code starts with
folding the code to have a better understanding. |
@mbrzakovic why does Did you see the discussion on |
@karlcow I recently took over as interim maintainer for iD. I am guessing that up until now 'isInteger' was used to differentiate between Mac OS 2-finger panning and mouse scroll on Firefox. (2 finger panning should move the map while mouse scroll should zoom in/out). Please look at https://github.com/openstreetmap/iD/blob/81b7e282c31391fc6457964f437fcab85ef90b6e/modules/renderer/map.js#L562. During debugging I found that for Mac OS firefox dX, dY are integerers for both cases, which does not seem to happen for other browsers. |
Someone has laid out the issues |
This problem still happen in Firefox latest 103.0.1 (not nightly) I think openstreetmap/iD#5550 is related. |
@denschub Thank you for the action! I upload 7 record video about my operation in different situation in iD's repository: openstreetmap/iD#5550 (comment) (more information can be seen here)
Oh, sorry! This is because I wrong use MacOS's UA: openstreetmap/iD#5550 (comment) now everything work correctly. |
This has been fixed, close? |
Yeah, I think it's safe to close this. Thanks for the reminder! |
@wisniewskit, if I’m not mistaken, this issue is specific to macOS and still reproduces. @LaoshuBaby was using Windows, which has always been unaffected by the issue. I provided more details in openstreetmap/iD#8649. Since then, a fork of iD worked around this issue, sort of, by adding a user preference that Mac Firefox users must manually select if they want the intended behavior. |
Yeah, sorry for the delay here, I'll reopen this for now. |
URL: https://www.openstreetmap.org/edit#map=15/45.5535/-73.5994
Browser / Version: Firefox 88.0
Operating System: Mac OS X 10.15
Tested Another Browser: Yes Chrome
Problem type: Something else
Description: Since firefox 88, the mousewheel just scroll down instead of zooming in or out in openstreetmap editor Id. I tried going back to version 87, and everything works fine, so something has changed in the mousewheel behaviour in firefox 88.
Steps to Reproduce:
Since firefox 88, the mousewheel just scroll down instead of zooming in or out in openstreetmap editor Id. I tried going back to version 87, and everything works fine, so something has changed in the mousewheel behaviour in firefox 88.
Browser Configuration
From webcompat.com with ❤️
The text was updated successfully, but these errors were encountered: