[APZ] No scrolling acceleration available for touchpad input
Categories
(Core :: Panning and Zooming, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: sawyerbergeron, Assigned: sawyerbergeron)
Details
Attachments
(2 files, 1 obsolete file)
2.20 KB,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0
Steps to reproduce:
- Scroll quickly down on a page
- Perform an upward gesture for same distance, but slower velocity
Actual results:
Page arrives at same location as start
Expected results:
Page should be offset, biased toward the direction the faster gesture happened in
Applications where expected behavior present: Microsoft Edge, Safari, Cocoa native apps (OSX)
Scroll acceleration in practice tends to make scrolling feel subjectively "snappier", more responsive, more "natural"
A user configurable amount of touchpad scrolling acceleration should be added, with curve/function to TBD. Some platforms provide this natively in touch drivers (some windows touchpad drivers) and others rarely provide it natively (wayland on linux/evdev/libinput)
The curve should ideally allow negative acceleration as well, for individuals who wish to counteract platform provided acceleration for accessibility related reasons
Assignee | ||
Comment 1•4 years ago
|
||
Filed as continuation of discussion from https://bugzilla.mozilla.org/show_bug.cgi?id=1604330
Assignee | ||
Comment 2•4 years ago
|
||
Related functionality appears to have been implemented in the past (potentially), but recent digging only turns up acceleration for actual mouse wheels (https://bugzilla.mozilla.org/show_bug.cgi?id=1401844)
If someone on OSX could confirm the platform native behavior that would be super helpful here (both in first party applications and in firefox)
Assignee | ||
Comment 3•4 years ago
|
||
Current proof of concept that subjectively feels "natural" is attached, any final implementation should abstract out any constants into StaticPrefs
Potential enhancement for user familiarity would be to add a threshhold below which scrolling acceleration is linear/not applied (more predictable for precise movements) as visually reflected in https://pavelfatin.com/scrolling-with-pleasure/#scrolling-acceleration
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
This change adds configuration options in static prefs to change the acceleration profile.
Subjectively a number in the range 1.33-1.37 feels most natural, but default is 1 to avoid disrupting what people may be used to.
It may make sense to have different behavior between platforms for the default as well.
From testing on microsoft edge and google chrome on windows, it appears there is no linear segment at slow speeds (acceleration is always exponential) so a simple exponential profile here may make the most sense to preserve consistency.
Comment 6•4 years ago
|
||
Thanks for the patch, Sawyer! Could I ask you to submit it to our Phabricator code review system please?
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #6)
Thanks for the patch, Sawyer! Could I ask you to submit it to our Phabricator code review system please?
Happily.
I seem to be having trouble adding you as a reviewer, r=botand
is rejected by moz-phab for me, is just adding that on the end of the commit title not correct?
Comment 8•4 years ago
|
||
(In reply to Sawyer Bergeron from comment #7)
I seem to be having trouble adding you as a reviewer,
r=botand
is rejected by moz-phab for me, is just adding that on the end of the commit title not correct?
It should work with the typo fixed (r=botond
) :)
Assignee | ||
Comment 9•4 years ago
|
||
Assignee | ||
Comment 10•4 years ago
|
||
Whoops, fixed/submitted. Thanks for catching that :)
Comment 11•4 years ago
|
||
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b3bbe5aee5db Add touch acceleration r=botond
Comment 12•4 years ago
|
||
bugherder |
Assignee | ||
Comment 13•4 years ago
|
||
Is this something we should add some non-1 factor to by default? Not sure if default should be accelerated scrolling or not.
Comment 14•4 years ago
•
|
||
We can try to make it accelerated by default.
I would suggest we proceed cautiously: first change it on the nightly channel only, and wait a while to see if we receive any user feedback.
Would you be able to try some other Linux browsers (e.g. Chrome Linux, Epiphany) and compare the behaviour? If the change brings us closer to other Linux browsers' behaviour, that's an encouraging sign.
Assignee | ||
Comment 15•4 years ago
|
||
I think I see very slight acceleration in Chromium-Ozone on wayland, and GTK states that they have scrolling acceleration from what I can find (https://gitlab.gnome.org/GNOME/gtk/issues/695) but Epiphany doesn't seem to have any noticeable acceleration and other native GTK apps for me on X don't display any noticeable acceleration.
Adding acceleration would probably move us out of alignment with general platform behavior, though it seems intent for the platform is for there to be acceleration for touchpads (responsibility tends to bounce around for where it should be implemented, primary discussion in https://gitlab.freedesktop.org/libinput/libinput/issues/252 which references GTK bug https://gitlab.gnome.org/GNOME/gtk/issues/1308. Older discussion about this for scroll wheels is at https://gitlab.freedesktop.org/libinput/libinput/issues/7.
Recent opinion from Peter Hutterer (libinput maintainer) in https://gitlab.freedesktop.org/libinput/libinput/issues/105 is "yes, add scroll acceleration. But add it in GTK/Qt, not in libinput. 5 years down the track you'll have less grey hair and regrets because of it." so I'm not sure how to pull all of that into a single opinion on whether the default for this should be set in Firefox, it gets complicated fairly quickly. I might open a bug report for GTK about what the status of scrolling acceleration is and what current plans are for it. Qt may follow but they have issues with smooth scrolling in general (doesn't work on Wayland currently, spotty on X.)
Updated•4 years ago
|
Description
•