Wheel events unusable on Windows |
||
Issue description
Chrome Version: 57.02987.133 (64-bit)
OS: Windows 10
What steps will reproduce the problem?
So these are the top 10 items on Chrome Windows that I’ve encountered on 3 machines. I’ll try to log this a crbug, but the bugs are pretty numerous in this case. Our Mac build can detect and isolate the pinch-zoom gesture, but Windows has to treat ctrl+wheel and pinch-zoom the same, despite vastly different deltaY values across machines. Firefox and Edge have their own issues, but I’ll leave those off.
Chrome
I would chalk these up to Windows drivers, but I've seen this behavior across
three machines. These behaviors apply to Chrome Windows.
on Dell XPS15 with high-precision touchpad
on Samsung Notebook Pro 9 with high-precision touchpad
on Razer Stealth without high-precision touchpad
1. applies dpr on Windows to wheel data, but no other browser does.
Chrome doesn’t apply dpr on Mac either.
2. all Windows browsers apply numLinesToScroll, but no way to remove this
there are many scrolling/panning/pinch-zoom cases which should not scale to this
so need a way to remove it.
3. sends 0.8333, 1.6666, ... repeating deltaX sequences on low speed left-to-right movement
for wheel deltaXY, but only 0.8333 for slow speed vertically
this results in diagonal movements feeling 2x slower vertically
4. Mac Chrome and Safari match on values, but pinch-zoom is on completely different
scale than ctrl+wheel. Have to convert differently.
5. Chrome Windows has no distinguishing feature on key-down event sent on Windows for pinch-zoom vs. actual ctrl+wheel.
(None of the browsers do). On Mac, the repeat value is set on the faked event. Due to 4, this is a big problem.
6. Pinch zoom on Chrome Windows is (on XPS15)
This means treating both as zoom is difficult, since the values aren't normalized)
// Dell
// wdy (divided by dpr)
// pan = 1
// pan-w = 1
// zoom = 1 for ctrl+wheel with touchpad
// zoom-w = 120 for ctrl+wheel with Wheel Mouse Optical
// pinch = 120 for pinch-zoom with touchpad
// Samsung
// pan = 1
// pan-w = 1
// zoom = 1
// zoom-w = 1 <- difference
// pinch = 120
// Razer
// pan = 1
// pan-w = 1
// zoom = 4 <- difference
// zoom-w = 4 <- difference
// pinch = 120
7. Mouse movement opposite to existing direction does not send wheel events
until you exceed a touchpad distance threshold, causing diagonal panning to fail.
Mouse is locked into horizontal or vertical pan. +/-30 pixel threshold.
This makes diagonal panning feel really broken.
8. I never see a diagonal wheel value (both dx/dy set) on Windows, but do on Mac.
Chrome is always sending purely vertical then horizontal events for diagonal movement.
9. Seeing spikes in wdy/dy values with inertia.
Also there are large values at end of inertia that cause abrupt stop.
This is especially bad on zoom, where we get sudden zoom and the user gets lost.
Mac has some variation in the delta (not a true ramp up/down, but it’s much better than Windows)
Pan in a single direction and these are deltaY values that I see on XPS 15.
91, 24, 27, 41, 37,45,41,51,46,48,23*,81*,91,69,48,36, 101*, 6*, 45,64,23, 31, 26,25, 17,12, 15, 6
10. Impossible to identify inertia events in the browser to lock out
zoom from pan inertia, or pan from zoom inertia. So have to look at timestamps.
The spikes from 3 and 9 mean you can't identify decelerating inertia from delta.
11. Support high-precision touchpad on Windows.
Maybe this would provide something other that 120 for pinch.
What is the expected result?
Mac-like touchpad support especially on high-precision touchpads.
Some way to distinguish pinch-zoom
Ability to remove numLinesToScroll.
What happens instead?
There are so many issue above, that it's near impossible to support a canvas that has to zoom, pan, and pinch-zoom without moving to pointer events. Native OSX apps (and Safari) simply respond to gesture for pinch-zoom, and wheel for zoom/pan. Often times zoom has an invert preference that should not apply to pinch-zoom. We currently have to treat zoom and pinch the same on Windows, so the preference applies to both.
Please use labels and text to provide additional information.
,
Apr 11 2017
,
Apr 11 2017
12. Mac vs. Windows delta (both with inverted scrolling set). So this is another problem that Mac pinch-zoom is a different sign convention than Windows. With no way to identify zoom vs. pinch on Windows, then we don't know which to invert. This causes pinch vs. zoom to behave inverted between platforms when they're both routed through zoom on Windows. Mac delta Pinch-in (zoom-out) -0.002 Pinch-out (zoom-in) 0.002 Win Pinch-in (zoom-out) 100 Pinch-out (zoom-in) -100
,
Apr 17 2017
Here's a wheel logger, and paths for handling Chrome on Mac, and Chrome/Edge/Firefox on Windows. You can see the values mentioned above from this. https://jsfiddle.net/alecazam/my6gntrr/ 1. Touchpad swipe/browser zoom can't be overridden on Edge w/hi precision touchpad 2. Firefox doesn't have pinch convert gesture to fake ctrl+wheel on Mac. 3. Chrome has wildly different values on Windows for hi vs. low-precision touchpads 4. Chrome Windows doesn't generate ctrl+wheel the same on Windows as on Mac |
||
►
Sign in to add a comment |
||
Comment 1 by a...@figma.com
, Apr 10 2017