Closed Bug 1467380 Opened 7 years ago Closed 5 years ago

avoid accidental slightly x-scroll when scrolling vertically using touchpad (implement axis locking for mac trackpad)

Categories

(Core :: Panning and Zooming, defect, P3)

60 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: ryenus, Assigned: wesj, Mentored)

References

(Blocks 2 open bugs, )

Details

(Whiteboard: [gfx-noted] [lang=c++])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180605171542 Steps to reproduce: scroll a page vertically using touch-pad, on any device that has it, e.g. a macbook. Actual results: the page is scrolled vertically, a slight horizontal scrolling is also performed. Expected results: Technically there's nothing wrong, because human fingers cannot perform precisely one-axis scroll. However, what I really want is, to only scroll the page up/down, without any x-axis movement. Or when I want to scroll horizontally, I would not want the page to move anyhow vertically.
> However, what I really want is, to only scroll the page up/down, without any x-axis movement. Or when I want to scroll horizontally, I would not want the page to move anyhow vertically. In a sense that when scrolling the page up/down, unless my fingers moved intentionally on the x-axis, any x-axis movement within an acceptable range should be ignored. Similar to the window edge snapping feature as if there's a virtual edge to snap to.
Initially triaging this to APZ. I'm not sure however how much this is a Firefox bug and maybe something more Trackpad fine tuning. Ryenus, could you post please a page example that you encounter the issues on?
Component: Untriaged → Panning and Zooming
Flags: needinfo?(ryenus)
Product: Firefox → Core
The URL I'm adding reproduces this. In Safari they do appear to do a bit of axis locking so it's harder to accidentally scroll horizontally. In Firefox it's easy. Adding some light axis locking would fix this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(ryenus)
Priority: -- → P3
Summary: avoid accidental slightly x-scroll when scrolling vertically using touchpad → avoid accidental slightly x-scroll when scrolling vertically using touchpad (implement axis locking for mac trackpad)
Whiteboard: [gfx-noted]
We may have a diagnosis for this in bug 1451461 comment 5.
Thanks Kartikaya, and yes, both Safari and Chrome provides the expected behavior meanwhile Firefox doesn't (yet). Also this is more of a feature request, rather than a bug.
Hi, I accidentally stumbled upon this report. This feature is actually implemented, and is enabled at least on GNU/Linux (tested on Archlinux. And yes, I know that libinput recently got the same feature, but I disabled it before re-testing). So someone just gotta enable it on OS X. Tested with: Firefox 61.0.2; Platform: Archlinux.
(In reply to Hi-Angel from comment #6) > Hi, I accidentally stumbled upon this report. > > This feature is actually implemented, and is enabled at least on GNU/Linux > (tested on Archlinux. And yes, I know that libinput recently got the same > feature, but I disabled it before re-testing). So someone just gotta enable > it on OS X. > > Tested with: Firefox 61.0.2; Platform: Archlinux. I assume you were using a touchpad (as opposed to touchscreen) to test this. Perhaps it's your touchpad driver doing the axis locking? Firefox does not implement axis locking for Linux or Windows touchpads. The axis locking that it does implement applies only to touchscreens and Mac trackpads, and it's currently only enabled on Android (where it's only relevant to touchscreens).
(In reply to Botond Ballo [:botond] from comment #4) > We may have a diagnosis for this in bug 1451461 comment 5. (When I wrote this, I didn't realize that axis locking is disabled on desktop platforms, which is the more obvious reason why isn't not working, although the issue mentioned in bug 1451461 will likely need to be fixed as well.)
Let's make this a mentored bug, as the actual change we need to make here is very straightforward. Whoever volunteers to take this on should have access to a Mac to test the change and tweak the configuration parameters if necessary.
Mentor: botond
Whiteboard: [gfx-noted] → [gfx-noted] [lang=c++]
> I assume you were using a touchpad (as opposed to touchscreen) to test this. Yes. I think you're confused, touchscreen was never mentioned in this thread. > Perhaps it's your touchpad driver doing the axis locking? No, when I disable libinput's axis lock, and scroll vertically the test page in Qutebrowser, I see small horizontal motions as well. And overall, I was a tester when axis-lock was developed into libinput, and I didn't saw any app doing axis lock except of Firefox. And yes, I checked that libinput's axis lock indeed got disabled before testing with Firefox. Fun fact: the first time I noted that Firefox does axis lock *was after* I started used libinput's one. The reason is that Firefox does more aggressive locking (which is justified for its usecase, but would be inappropriate for libinput), and I thought it's something wrong with libinput's algo. After some testing I figured it's irrelevant to libinput.
Okay, I stand corrected: I pulled up Fedora Live USB, and I don't see axis lock there. I have no idea, why it works on Archlinux, they don't apply any side patches either.
Blocks: 1581407
Blocks: apz-mac

Last time I checked the behavior in Safari, it worked as follows: Rather than having a global "currently locked" state, each event is considered separately. The event's horizontal and vertical components are compared, and the component with the smaller amount is ignored.

We'll want to make sure that web content wheel events still carry the full delta information, so we want the locking to happen only in the place where we do scrolling.

Is the cheap solution to this just to set apz.axis_lock.mode to 2? That seems to prevent some slight accidental slips for me, but still allows smooth diagonal scrolling you break it (and IMO feels better than both Safari and Chrome's implementations that jerk back and forth between locking the x and y axis as you scroll diagonally).

Yep, that's the basic change to be made here.

As we haven't had anyone interested in taking this as a mentored bug, perhaps we should just flip the pref, and consider any tweaks as a follow-up if necessary?

Setting apz.axis_lock.mode to 2 works for me well too. I would very much appreciate the flip to 2 by default. Thanks :)

Assignee: nobody → wjohnston2000
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
QA Whiteboard: [qa-78b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: