Open Bug 1235192 Opened 9 years ago Updated 2 years ago

Zoom controls on google maps are way too sensitive

Categories

(Core :: DOM: Events, defect, P5)

x86
macOS
defect

Tracking

()

People

(Reporter: sicking, Unassigned)

References

Details

(Keywords: site-compat)

Steps to reproduce on a macbook pro (likely works just as well on any other mac with a touchpad): 1. Go to https://maps.google.com 2. Focus search area (which says "Search Google Maps") 3. Enter a location of some destination, for example "Stockholm, Sweden" and press enter. 4. Place two fingers on the touchpad. 5. Slide fingers up/down to zoom in/out. Expected results: Zoom in and out to a desired zoom level with ease. Actual results: The map zooms in and out as expected. However it zooms in and out *really* fast. I.e. in order to zoom in just a little bit you have to be super careful. The effect is even more pronounced if steps 4-5 are done while the tiles are still loading since the animation is in general more choppy due to the CPU load of loading tiles, and so it becomes very hard to get to the desired zoom level. The effect is that zoom controls are effectively not usable in Firefox until all tiles are fully loaded. Compare to doing the same in chrome. There seems to be almost a 5x difference in how sensitive the controls are between the two browsers. I'm not sure if the problem here is that gecko just generally fires events with bigger deltas. Or if Google Maps ends up executing different code paths for the different browsers and that the code path Gecko is running just needs to have its multiplier tuned down.
Do we dispatch wheel events with deltaMode DOM_DELTA_PIXEL and chrome with deltaMode DOM_DELTA_LINE?
(In reply to Olli Pettay [:smaug] from comment #1) > Do we dispatch wheel events with deltaMode DOM_DELTA_PIXEL and chrome with > deltaMode DOM_DELTA_LINE? IIRC, Chrome can dispatch wheel events only with DOM_DELTA_PIXEL due to their internal design. Gecko dispatches wheel events as far as lossless from native wheel events: mouse wheel events on Windows: DOM_DELTA_LINE or DOM_DELTA_PAGE pan gesture events on Windows: DOM_DELTA_PIXEL legacy wheel events on Mac: DOM_DELTA_LINE modern wheel events on Mac: DOM_DELTA_PIXEL on Linux: DOM_DELTA_LINE
FWIW, on OSX i can't think of any software which does line-based scrolling using the touchpad. It's all pixel based. I don't know if other OSs does linebased scrolling with the touchpad though? The only exception to this that I know of is spreadsheet software which never does per-pixel scrolling, but only does matrix-row scrolling.

Trying to reproduce this, but I don't think I see the problem ...

Priority: -- → P5

I can reproduce this on Firefox 83 on Arch Linux using Wayland which appears to dispatch with DOM_DELTA_PIXEL. Firefox under X11 (by unsetting MOZ_ENABLE_WAYLAND) does indeed dispatch wheel events with DOM_DELTA_LINE.

Running this code in the web console while on Google Maps reveals a difference between Firefox Wayland and Chrome which both dispatch with DOM_DELTA_PIXEL:

DELTA_Y = Object.getOwnPropertyDescriptor(WheelEvent.prototype, "deltaY").get
Object.defineProperty(WheelEvent.prototype, "deltaY", { configurable: true, enumerable: true, get() { console.log(`deltaY! deltaMode = ${this.deltaMode}, deltaY = ${DELTA_Y.call(this)}`); return DELTA_Y.call(this); } })

This is the sort of console output produced by Firefox on Wayland:

deltaY! deltaMode = 0, deltaY = 0.02105712890625
deltaY! deltaMode = 0, deltaY = 0.01409912109375
deltaY! deltaMode = 0, deltaY = 0.0069580078125
deltaY! deltaMode = 0, deltaY = 0.01409912109375
deltaY! deltaMode = 0, deltaY = 0.0069580078125

Compared to Chrome:

deltaY! deltaMode = 0, deltaY = -4
deltaY! deltaMode = 0, deltaY = -3
deltaY! deltaMode = 0, deltaY = -2
deltaY! deltaMode = 0, deltaY = -4
deltaY! deltaMode = 0, deltaY = -3

I can confirm I've been experiencing this on AsusLaptop, Xubuntu20.04, X11, Firefox-83.0 for quite some time. It's maddening!

I used to experience this bug, as recently as probably a month or two ago, and now I don't. Two-finger scrolling with a trackpad works as expected. I'm not sure what (if anything) changed, nor when. On 92.0b7 right now. (MacBook Air, Apple Silicon.)

See Also: → 1779256
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.