Closed Bug 1348786 (s2n-win) Opened 7 years ago Closed 2 years ago

Trackpad gestures (swipe left/right to navigate history) not working on Windows

Categories

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

52 Branch
x86
Windows 10
defect

Tracking

()

VERIFIED FIXED
97 Branch
Tracking Status
firefox97 --- disabled
firefox98 --- disabled
firefox99 --- verified

People

(Reporter: enrico.schroeder, Assigned: hiro, NeedInfo)

References

Details

(Whiteboard: tpi:+, widget-next)

Attachments

(13 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170316213829

Steps to reproduce:

Using precision touchpad in Windows 10, trying to swipe left/right with two fingers.


Actual results:

Nothing


Expected results:

Navigating browser history (page back) like in Microsoft Edge or Firefox on Mac.
kats, do you know if it's a known issue on Win 10?
Component: Untriaged → Widget: Win32
Flags: needinfo?(bugmail)
OS: Unspecified → Windows 10
Product: Firefox → Core
Hardware: Unspecified → x86
This is probably a result of turning on touch support in 52. Same root cause as bug 1345355.

Enrico, can you please go to about:support and check what it says under "Asynchronous Pan/Zoom" in the graphics section? Also, what hardware are you using - is it a Synaptics touchpad or some other kind of touchpad? The more details on the hardware and driver versions you can provide the more useful it will be. Thanks!
Flags: needinfo?(bugmail) → needinfo?(enrico.schroeder)
See Also: → 1345355
Hi,

the about:support page lists "wheel input enabled; touch input enabled".

I'm using an HP Elite X2 (Surface like tablet) with attached keyboard. It has an Alps touchpad which lets me select two modes in the driver, a "Precision Touchpad" mode and the standard Alps mode. Swipe gestures work for neither. Driver version is 8.2206.1717.156.

I've force-enabled e10s, but disabling it changes nothing.

Happy to provide additional info if needed. 


Another issue (which is probably unrelated): Firefox does not seem to support swipe back gestures via touchscreen (again, like Edge or recently also Chrome). Is this supported or planned? Should I open another bug/feature request for that?
(In reply to enrico.schroeder from comment #3)
> I'm using an HP Elite X2 (Surface like tablet) with attached keyboard. It
> has an Alps touchpad which lets me select two modes in the driver, a
> "Precision Touchpad" mode and the standard Alps mode. Swipe gestures work
> for neither. Driver version is 8.2206.1717.156.

Thanks.

> I've force-enabled e10s, but disabling it changes nothing.

Most likely what's happening here is that in 51 and older versions you needed to force-enable e10s to have it on. In 52 it's on by default for you, so removing the pref to force-enable it will still leave it on. You can verify this by checking what it says under "Multiprocess Windows" in about:support while in this configuration.

> Happy to provide additional info if needed. 

Can you try setting the dom.w3c_touch_events.enabled pref to 0 and see if that fixes this problem? You'll need to restart the browser after changing the pref.

> Another issue (which is probably unrelated): Firefox does not seem to
> support swipe back gestures via touchscreen (again, like Edge or recently
> also Chrome). Is this supported or planned? Should I open another
> bug/feature request for that?

This is not yet supported or planned, feel free to file a separate bug for that, and mark it as blocking bug 1334161.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4)
> Can you try setting the dom.w3c_touch_events.enabled pref to 0 and see if
> that fixes this problem? You'll need to restart the browser after changing
> the pref.
> 

Setting dom.w3c_touch_events.enabled to 0 does not change anything. 

By the way, I've noticed that pinch-to-zoom via the touchpad works as intended.

> > Another issue (which is probably unrelated): Firefox does not seem to
> > support swipe back gestures via touchscreen (again, like Edge or recently
> > also Chrome). Is this supported or planned? Should I open another
> > bug/feature request for that?
> 
> This is not yet supported or planned, feel free to file a separate bug for
> that, and mark it as blocking bug 1334161.

Will do!
Flags: needinfo?(enrico.schroeder)
(In reply to enrico.schroeder from comment #5)
> Setting dom.w3c_touch_events.enabled to 0 does not change anything. 

Oh, interesting. This is likely unrelated to bug 1345355 then.

> By the way, I've noticed that pinch-to-zoom via the touchpad works as
> intended.

That's useful to know, thanks. I suspect what's happening here is that the touchpad driver is actually sending us specific keyboard combinations when you do specific gestures. So for example doing the two-finger left/right swipe would cause the driver to actually send us an alt-left or alt-right keyboard input, which we would then treat as back/forward. As far as I can tell Firefox (on Windows) doesn't have any forward/back swipe gesture detection code, but there is evidence that other drivers do this [1]. For some reason this mechanism seems to have broken down.

Some things to try to help narrow down the problem:
- Disable e10s, restart the browser, and see if it goes away. You can disable e10s by resetting the browser.tabs.remote.force-enable pref (if you have it) and setting browser.tabs.remote.autostart.2 to false. You can verify it is disabled by going to about:support and checking what it says for "Multiprocess windows"
- If disabling e10s fixes the problem, re-enable e10s and disable APZ instead. (browser.tabs.remote.autostart.2 back to true, and layers.async-pan-zoom.enabled=false). Restart the browser and see if it's still fixed. If so, that means it's an APZ problem; if not, it's an e10s problem.

[1] http://searchfox.org/mozilla-central/rev/557f236c19730116d3bf53c0deef36362cafafcd/widget/windows/WinMouseScrollHandler.cpp#1365
See Also: 1345355
Priority: -- → P2
Whiteboard: tpi:+
Priority: P2 → P3
Whiteboard: tpi:+ → tpi:+, widget-next

Just to confirm same happens for me, Firefox 67, Windows 10, Precision trackpad. To follow up on the last request - still did not work with browser.tabs.remote.autostart set to false, or layers.async-pan-zoom.enabled set to false. Pinch zoom does work, two-finger scroll does work, only two finger left/right does not navigate. Tried turning off two-finger scrolling in system settings, and that did indeed stop two-finger scrolling but no other change.

Same for me, one finger swipe left/right does not work for me on FF 71, either on Gentoo Linux or Windows 10. It is interesting that same gesture works well on Google Chrome/Chromium. It seems that swipe right or left always works as scrolling left or right but behaviour does not respond to the commands set in about:config which are by default back and forward. I doubt that this is system-wide problem since the behavior is same across operating systems and there is no problem with Chrome, and Firefox always respond to swipe left and right as scroll event.

Confirming the Same Behavior

In Firefox:

  • Two finger scroll up and down works correctly
  • Two finger scroll horizontally works correctly when a page is zoomed
  • Pinch to zoom works correctly both with apz.allow_zooming enabled or disabled
    • This setting enables Chrome style smooth zooming rather than the Firefox native reflow zooming

In Chrome/Edge:

All above gestures working + two finger swipe for forward and back working

Experimentation:

As horizontal scrolling works correctly via the track pad I tried to determine whether the issue is from the Browser:BackOrBackDuplicate command. To do this I change the following settings in about:config

Old Values:

browser.gesture.swipe.left    Browser:BackOrBackDuplicate
browser.gesture.swipe.right   Browser:ForwardOrForwardDuplicate

New Values:

browser.gesture.swipe.left    cmd_scrollTop
browser.gesture.swipe.right   cmd_scrollBottom

This resulted in no change in behavior. The swipe left and swipe right gestures did not trigger the vertical scroll commands as I hoped. This makes me think that Browser:BackOrBackDuplicate and Browser:ForwardOrForwardDuplicate are working properly, and that Firefox simply isn't registering the left and right swipe gestures

Firefox: Version 73.0.1 (64-bit)
OS: Windows 10 Version 10.0.1863 Build 18363
Hardware: Microsoft Surface Book 2, i7-8650U, 8GB RAM, GTX 1050
TouchPad: Intel Precision Touch Device Driver Version 1.2.0.100

First bug reporting for me, i have the same problem. I check the value :

browser.gesture.swipe.left : Browser:BackOrBackDuplicate
browser.gesture.swipe.right : Browser:ForwardOrForwardDuplicat

All looks good.

But ! if i use SwipeToNavigate by top1, it work.

https://addons.mozilla.org/fr/firefox/addon/swipetonavigate/?src=search

If i can give you more information, please tell me.

Thanks all

The browser.gesture.swipe.* prefs are only used in the browser-gestureSupport.js code, in particular in response to these internal events that are dispatched from the per-platform Gecko widget layer. However, as far as I can tell, the Windows code does not, and has never, dispatched swipe events. So if horizontal two-finger swipe used to do forward/back, I'm pretty confident it wasn't due to Firefox handling the swipe, but the trackpad driver converting that gesture in some key combination that Firefox understands. If this used to work before but doesn't work now, it is likely due to some change in Firefox that caused the trackpad driver to stop doing this, or that otherwise breaks some assumptions. The most useful thing to do would be to get a regression range using mozregression on Firefox Nightly builds.

This is on our shortlist of features we'd really like to implement.

There have been discussions of this being one of a set of APZ features / improvements worked on as part of the Firefox Proton refresh, but even if it doesn't make that cut, it's likely to be a high-priority follow-up.

bump. this is a deal-breaking UX feature, especially for users coming from chromium-baesd browsers

+1, gesture based navigation should be core functionality

+1, the browser feels dated without a this working on both touchpad and touchscreen.

+1 , this is incredibly important to me and other people I have tried to convince to use Firefox

+1, I created an account just to write this comment, so hopefully that shows you something. About 2 years ago I moved back over to Firefox and it's been working great on my Windows desktop and Mac laptop, but since my (very) recent switch to a Windows-based laptop this is a dealbreaker in terms of UX for me, as this works fine on Mac (so, I'm used to it) and all other major browsers on Windows implement this feature, so there really can't be an argument for Firefox not to have it. I'd hate to switch back to Chrome on all my devices, but it's really THAT annoying not to have this feature.

+1 for me too. Its really strange but on one Windows laptop three swipe gesture does go back/forward but not on this laptop. It would be great if it was just 2 finger gesture as standard (and works).

(In reply to Rez from comment #22)

+1 for me too. Its really strange but on one Windows laptop three swipe gesture does go back/forward but not on this laptop. It would be great if it was just 2 finger gesture as standard (and works).

The 3 finger swipe can be configured via the Windows Touchpad settings, so one of your laptops will have that configuration, the other one won't. Also see this thread on Reddit, where you can find instructions on how to configure this in more detail: https://www.reddit.com/r/firefox/comments/m1y1ps/windows_10_touchpad_gestures_two_finger_swipe_to/

Nonetheless, I use 2 finger swipe for a reason, so 3 finger swipe configuration isn't going to cut it for me.

This is totally absurd. Just tried switching back to Firefox after trying Quantum when it came out and having to leave (for a multitude of reasons); not having this is a real deal-breaker, however mundane it may seem. So many people are used to this gesture and it ruins the experience to have to press ALT + Left or move the mouse to the back button, especially when trying to research and/or just navigate quickly. I genuinely save so much time doing the two-finger swipe, even though Firefox seems faster and lighter weight, I can move around so much faster in edge or chrome I can only use Firefox when I'm not trying to do something quickly, because it does really matter that much. In Firefox I have to go from what I do in supporting browsers which is moving on the trackpad with one finger then adding another to quickly go up, down, or to navigate, to either go to the top corner to click on things while scrolling then move to the page content to scroll then go back again, or use the keyboard shortcut which is more intrusive than just typing because the shortcut keys are right where my palm is. This is such a simple easy mechanic that so many people appreciate it is an serious understatement to say it's gigantic miscalculation here. This is infuriating. I, too, like other people have had to make an account just to say this here. This is seriously dumb. This has been broken for years.

I've also been trying to migrate my primary browser usage back to Firefox, but this is very important missing UX feature IMHO. I'm only leaving a comment because I don't see a way to to vote for issues, and this is the next best thing.

Folks, we hear you. This feature is on our (Panning and Zooming team) roadmap, and it's very close to the top of it. The only thing ahead of it are our very highest priority stability fixes. We're working hard to get through those and looking forward to starting development on this in the next month or so.

Moving component to Panning and Zooming to reflect that, while this will involve changes to Widget code, our team will be working on this feature.

Severity: normal → S2
Component: Widget: Win32 → Panning and Zooming
Priority: P3 → P2

That's great, thank you for the confirmation Botond :)

Oops I've been CC-ed here but I did forget this bug. :/ For browser navigation by swipe gestures on Windows, I've started working on it in bu 1564022, FYI.

See Also: → 1564022
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Trackpad gestures (swipe left/right to navigate history) not working → Trackpad gestures (swipe left/right to navigate history) not working on Windows
See Also: → s2n-linux

Martin, I remember from an earlier discussion that when porting this feature (currently supported on Mac) to Windows, we may want to give the UX design team an opportunity to tweak the assets for the visual feedback arrows that appear when you perform swipe-to-navigate, to be consistent with the look of the platform, if they wish.

As we've now started engineering work on this feature, I wanted to flag you to see if we should run this by them / get it on their radar.

Flags: needinfo?(mbalfanz)
Depends on: 1746944

The PanGestureInput, the argument of the new function named CanTriggerSwipe,
is generated by theEvent, mPanDisplacement

so both inequalities are equivalent.

Depends on D134367

Depends on D134368

I uploaded all patches to make the swipe-to-nav work on Windows. I haven't yet written tests.

I found there's a test (which I wrote before, but I can't recall the detail), but it's for a specific case and only for Mac, we need to make it work on other platforms and add a general case.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #47)

I found there's a test (which I wrote before, but I can't recall the detail), but it's for a specific case and only for Mac, we need to make it work on other platforms and add a general case.

It turned out that the browser_test_swipe_gesture.js test would be sufficient, it includes normal navigations.

There's a race condition where the page navigation caused by swipe gestures has
already stopped when the promise for the pan gestures was resolved.

Depends on D134369

Attachment #9256295 - Attachment is obsolete: true

(sorry for the late response)

I will double-check with the team, but it's OK to continue with the assets we already have. We can file another bug in case we want to optimize the arrows.

Flags: needinfo?(mbalfanz)
Assignee: nobody → hikezoe.birchill
Attachment #9256287 - Attachment description: WIP: Bug 1348786 - Drop nsWindow::DispatchWindowEvent(WidgetGUIEvent*, nsEventStatus&). → Bug 1348786 - Drop nsWindow::DispatchWindowEvent(WidgetGUIEvent*, nsEventStatus&). r?masayuki
Status: NEW → ASSIGNED
Attachment #9256288 - Attachment description: WIP: Bug 1348786 - Move nsChildView::DispatchWindowEvent(WidgetGUIEvent&) into nsBaseWidget. → Bug 1348786 - Move nsChildView::DispatchWindowEvent(WidgetGUIEvent&) into nsBaseWidget. r?tnikkel
Attachment #9256289 - Attachment description: WIP: Bug 1348786 - Use GetDefaultScaleInternal instead of BackingScaleFactor in SwipeTracker::ProcessEvent. → Bug 1348786 - Use GetDefaultScaleInternal instead of BackingScaleFactor in SwipeTracker::ProcessEvent. r?tnikkel
Attachment #9256290 - Attachment description: WIP: Bug 1348786 - Move SwipeTracker class as reusable for other platforms. → Bug 1348786 - Move SwipeTracker class as reusable for other platforms. r?tnikkel
Attachment #9256291 - Attachment description: WIP: Bug 1348786 - Move mSwipeEventQueue from nsChildView into nsBaseWidget. → Bug 1348786 - Move mSwipeEventQueue from nsChildView into nsBaseWidget. r?tnikkel
Attachment #9256292 - Attachment description: WIP: Bug 1348786 - Move mCurrentPanGestureBelongsToSwipe into nsBaseWidget. → Bug 1348786 - Move mCurrentPanGestureBelongsToSwipe into nsBaseWidget. r?tnikkel
Attachment #9256293 - Attachment description: WIP: Bug 1348786 - Move ReportSwipeStarted() and TrackScrollEventAsSwipe() into nsBaseWidget. → Bug 1348786 - Move ReportSwipeStarted() and TrackScrollEventAsSwipe() into nsBaseWidget. r?tnikkel
Attachment #9256294 - Attachment description: WIP: Bug 1348786 - Move SendMayStartSwipe() into nsBaseWidget. → Bug 1348786 - Move SendMayStartSwipe() into nsBaseWidget. r?tnikkel
Attachment #9256296 - Attachment description: WIP: Bug 1348786 - Factor out functions to (may) trigger a swipe gesture into nsBaseWidget. → Bug 1348786 - Factor out functions to (may) trigger a swipe gesture into nsBaseWidget. r?tnikkel
Attachment #9256297 - Attachment description: WIP: Bug 1348786 - Factor out the last part of shouldConsiderStartingSwipeFromEvent into a new function. → Bug 1348786 - Factor out the last part of shouldConsiderStartingSwipeFromEvent into a new function. r?tnikkel
Attachment #9256298 - Attachment description: WIP: Bug 1348786 - Use SwipeTracker on Windows. → Bug 1348786 - Use SwipeTracker on Windows. r?tnikkel
Attachment #9256746 - Attachment description: WIP: Bug 1348786 - Get `browserStopped` promise before sending swipe gestures. → Bug 1348786 - Get `browserStopped` promise before sending swipe gestures. r?tnikkel
Attachment #9256747 - Attachment description: WIP: Bug 1348786 - Make browser_test_swipe_gesture.js work on Windows. → Bug 1348786 - Make browser_test_swipe_gesture.js work on Windows. r?tnikkel
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a6246c744779
Drop nsWindow::DispatchWindowEvent(WidgetGUIEvent*, nsEventStatus&). r=masayuki
https://hg.mozilla.org/integration/autoland/rev/c057fa40caf7
Move nsChildView::DispatchWindowEvent(WidgetGUIEvent&) into nsBaseWidget. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/28a5cb06ece8
Use GetDefaultScaleInternal instead of BackingScaleFactor in SwipeTracker::ProcessEvent. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/e96d9b6dc70c
Move SwipeTracker class as reusable for other platforms. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/70520fc1660e
Move mSwipeEventQueue from nsChildView into nsBaseWidget. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/5f838131ae32
Move mCurrentPanGestureBelongsToSwipe into nsBaseWidget. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/1c6284530243
Move ReportSwipeStarted() and TrackScrollEventAsSwipe() into nsBaseWidget. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/acefc474e960
Move SendMayStartSwipe() into nsBaseWidget. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/67859633bb44
Factor out functions to (may) trigger a swipe gesture into nsBaseWidget. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/72c816ff1334
Factor out the last part of shouldConsiderStartingSwipeFromEvent into a new function. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/c4d2d0f6137e
Use SwipeTracker on Windows. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/d1a04dde5a73
Get `browserStopped` promise before sending swipe gestures. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/9ff648d32b4d
Make browser_test_swipe_gesture.js work on Windows. r=tnikkel
Regressions: 1751124
Regressions: 1753146

Apologies for bumping a closed issue, but is this fix supposed to be available in the new Firefox 97 release? I have installed the update but touchpad gestures (i.e. swiping left/right) still do not work for me. Is it something I need to enable?

Flags: needinfo?(botond)

No, it was disabled on Firefox 97 unfortunately due to bug 1751124. You can still use the feature by setting widget.disable-swipe-tracker to false in about:config.

EDITED: s/widget.disable-swipe-tracker to true/widget.disable-swipe-tracker to false/

Flags: needinfo?(botond)

So when can we expect this feature to be enabled by default? Which issue is blocking it? The aforementioned bug seems to be closed as well.

See Also: → 1753885

(In reply to john from comment #56)

So when can we expect this feature to be enabled by default? Which issue is blocking it? The aforementioned bug seems to be closed as well.

We are planing to enable it on Firefox 98. But it depends on bug 1753146.

John and enfo, if you guys are Windows user, would you mind trying a build in bug 1753146 comment 1 to see whether those default pref values are too sensitive and giving us some feedback with tweaking the pref values? It would be quite helpful for us. Thanks!

Flags: needinfo?(john_titor)
Flags: needinfo?(enfo)

Hello guys, the build in bug 1753146 comment 1 has a big mistake. A new proper build is coming in bug 1753146 comment 10. Thanks!

Not sure if you want the feedback here or in bug 1753146, but I've installed the latest build now and can confirm that swiping to navigate is working. In regards to sensitivity (i.e. how far I have to swipe for the action to be registered/identified), it feels pretty much as expected to me (comparing to Chrome), but one big difference is the delay between the swipe motion being registered and actually being taken to the next/previous page.

In Chrome, the time from my swipe being registered/identified as "go to previous page" (I assume by crossing some distance threshold) to being taken to the actual page is near instant after I release my fingers from the touchpad.
In Firefox, I do the same swiping motion, the black arrow appears on the side of the window, and I can then let go of my touchpad for around 2-3 seconds before I am taken to the previous page. In other words, there seems to be some kind of lag after the swipe where nothing happens.

I hope this makes sense and is useful feedback.

Flags: needinfo?(enfo)

Thank you for the feedback. Indeed I saw the lag locally. I tried the build on my Windows laptop, then using the build forced me to create a new profile, then I saw the lag a couple of times. But after some back and forth navigation I no longer see the lag. So perhaps the browser did something for the new profile on background?

Hmm no, I saw the lag again, but can't produce now.

Okay I found a way to see the lag. The lag happens when I do strongly fling the gesture. And now I saw on Windows a PANGESTURE_END after pan momentum events... That's totally different from the behavior on Mac IIRC.

Blocks: 1754674

enfo, your feedback realized me bug 1754674. You saved a lot of my time. Thank you!

Updating flags because this was disabled in bug 1751124.

Alias: s2n-win

(In reply to john from comment #56)

So when can we expect this feature to be enabled by default? Which issue is blocking it? The aforementioned bug seems to be closed as well.

I've filed bug 1758196 to track enabling the feature by default on the release channel. You can follow that bug for updates.

Flags: qe-verify+

This is working as expected on RC 99, after chaining the pref widget.disable-swipe-tracker to false. Tested with Win 10 x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: