Three finger up/down swipes do not follow the natural scrolling direction

NEW
Unassigned

Status

()

Core
Widget: Cocoa
5 years ago
4 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
Changing that pref makes Firefox obey the system settings for regular scrolling, but three finger swipes work backwards.
> that pref

Which pref? :-)
(Reporter)

Comment 2

5 years ago
(In reply to comment #1)
> > that pref
> 
> Which pref? :-)

System Preferences -> Trackpad -> Scroll direction: natural.
> but three finger swipes work backwards

Not for me, as best I can tell.  But then I rarely use three-finger swipes.

On my systems I always leave "Scroll direction" set to "natural".  (At first I really hated it, but I wanted to get used to how "most" people scrolled.)  I also haven't changed any of the other Trackpad defaults.

With those settings, three-finger swipes only work horizontally, and swipe between "spaces".  And, like "natural" scrolling, they work by moving the page contents in the direction of the swipe (instead of an imaginary scroll bar thumb).

How are you using three-finger swipes?
(Reporter)

Comment 4

5 years ago
(In reply to comment #3)
> > but three finger swipes work backwards
> 
> Not for me, as best I can tell.  But then I rarely use three-finger swipes.
> 
> On my systems I always leave "Scroll direction" set to "natural".  (At first I
> really hated it, but I wanted to get used to how "most" people scrolled.)  I
> also haven't changed any of the other Trackpad defaults.
> 
> With those settings, three-finger swipes only work horizontally, and swipe
> between "spaces".  And, like "natural" scrolling, they work by moving the page
> contents in the direction of the swipe (instead of an imaginary scroll bar
> thumb).
> 
> How are you using three-finger swipes?

Hmm, browser.gesture.swipe.up and browser.gesture.swipe.down are cmd_scrollTop and cmd_scrollBottom for me (the defaults).  What's yours?
> What's yours?

Those Firefox settings are the same for me.  But I suspect you've changed another system Trackpad setting from its default (or you've made several changes).

When I three-finger-swipe-up, I get the same effect as clicking on Mission Control in the Dock.  When I three-finger-scroll-down, nothing happens.  This happens regardless of whether Firefox's currently focused page can be scrolled up and down or not.
I tested in FF 24 on a Retina MacBook Pro running OS X 10.7.5.
On OS X 10.8.5, though, a three-finger-swipe-down puts me at the bottom of a vertically scrollable page, and a three-finger-swipe-up puts me at the top.

Have you been testing on OS X 10.8.5?  Is this what you see?
As best I can tell, on OS X 10.8 the three-finger vertical swipe isn't used at all "by the OS".  On OS X 10.7.5 it is, though -- at least by default.

Apparently Firefox only ever sees the three-finger vertical swipe if the OS hasn't pre-empted it.
(Reporter)

Comment 9

5 years ago
(Sorry for the late reply, I'm terrible at keeping up with bugmail...)

(In reply to Steven Michaud from comment #5)
> > What's yours?
> 
> Those Firefox settings are the same for me.  But I suspect you've changed
> another system Trackpad setting from its default (or you've made several
> changes).

Could be, anything specific I need to look at?

(In reply to Steven Michaud from comment #7)
> On OS X 10.8.5, though, a three-finger-swipe-down puts me at the bottom of a
> vertically scrollable page, and a three-finger-swipe-up puts me at the top.
> 
> Have you been testing on OS X 10.8.5?  Is this what you see?

Yes to both!  And those directions are the reverse of the "natural" scrolling direction pref in the system trackpad settings.

(In reply to Steven Michaud from comment #8)
> As best I can tell, on OS X 10.8 the three-finger vertical swipe isn't used
> at all "by the OS".  On OS X 10.7.5 it is, though -- at least by default.
> 
> Apparently Firefox only ever sees the three-finger vertical swipe if the OS
> hasn't pre-empted it.

Hmm, I thought this is handled in our own code, using these prefs? <http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#568>

In other words, I think with "natural" scrolling direction, browser.gesture.swipe.up should be set to cmd_scrollBottom and browser.gesture.swipe.down to cmd_scrollTop.
> In other words, I think with "natural" scrolling direction,
> browser.gesture.swipe.up should be set to cmd_scrollBottom and
> browser.gesture.swipe.down to cmd_scrollTop.

So you want to make these settings the opposite of what they are now,
at least if the user has chosen "Scroll direction: natural" in the
Trackpad System Prefs panel.

Thinking about this stuff makes my head hurt :-(

Someone (maybe you?) needs to do an analysis of how we use these
settings on other platforms, and (maybe) how we've used them in the
past (if that's changed).
(Reporter)

Comment 11

5 years ago
(In reply to Steven Michaud from comment #10)
> > In other words, I think with "natural" scrolling direction,
> > browser.gesture.swipe.up should be set to cmd_scrollBottom and
> > browser.gesture.swipe.down to cmd_scrollTop.
> 
> So you want to make these settings the opposite of what they are now,
> at least if the user has chosen "Scroll direction: natural" in the
> Trackpad System Prefs panel.

Yeah, that's what I meant.

> Thinking about this stuff makes my head hurt :-(
> 
> Someone (maybe you?) needs to do an analysis of how we use these
> settings on other platforms, and (maybe) how we've used them in the
> past (if that's changed).

I don't think that we use them on other platforms (Gavin, is that correct)?

So we have swipeWithEvent and maybeTrackScrollEventAsSwipe in nsChildView.mm which seem to decide what Gecko event to synthesize, can we just synthesize the reverse event there if the natural scrolling mode is active?  (Although I can't figure out how we handle this for regular scrolling.)  AFAICT the front-end code which processes these swipe events lives in browser-gestureSupport.js.
(Reporter)

Comment 12

5 years ago
(In reply to :Ehsan Akhgari (needinfo? me!) [Away 10/29-11/6] from comment #11)
> > Thinking about this stuff makes my head hurt :-(
> > 
> > Someone (maybe you?) needs to do an analysis of how we use these
> > settings on other platforms, and (maybe) how we've used them in the
> > past (if that's changed).
> 
> I don't think that we use them on other platforms (Gavin, is that correct)?

Bah, I sometimes forget that Gavin doesn't watch all of the bugs any more!
Flags: needinfo?(gavin.sharp)
(In reply to :Ehsan Akhgari (needinfo? me!) [Away 10/29-11/6] from comment #11)
> I don't think that we use them on other platforms (Gavin, is that correct)?

http://mxr.mozilla.org/mozilla-central/search?string=NS_SIMPLE_GESTURE_SWIPE suggests we generate "swipe" events on WinRT and Mac (and Qt!?). Of those I imagine only Mac uses browser-gestureSupport.js (which observes the prefs).

> So we have swipeWithEvent and maybeTrackScrollEventAsSwipe in nsChildView.mm
> which seem to decide what Gecko event to synthesize, can we just synthesize
> the reverse event there if the natural scrolling mode is active?  (Although
> I can't figure out how we handle this for regular scrolling.)  AFAICT the
> front-end code which processes these swipe events lives in
> browser-gestureSupport.js.

I'm not sure this makes sense - the system scrolling pref should only impact scrolling actions, and swipes can be configured to do non-scrolling actions. I suppose a special case in the front-end code might be OK, but then we'd need some way to determine the system pref state.
Flags: needinfo?(gavin.sharp)
> the system scrolling pref should only impact scrolling actions

This is part of what makes my head hurt :-)

Before we make any changes here, at the very least we need to look for equivalents to the swipe-to-top-or-bottom behavior on Metro (in Firefox and other browsers), and on OS X in other browsers.

And as peoples' muscle-memory has probably gotten used to the current behavior, I hesitate to make any changes at all.
(Reporter)

Comment 15

5 years ago
(In reply to comment #14)
> > the system scrolling pref should only impact scrolling actions
> 
> This is part of what makes my head hurt :-)
> 
> Before we make any changes here, at the very least we need to look for
> equivalents to the swipe-to-top-or-bottom behavior on Metro (in Firefox and
> other browsers), and on OS X in other browsers.

Do we have this kind of behavior on any other platform though?

> And as peoples' muscle-memory has probably gotten used to the current behavior,
> I hesitate to make any changes at all.

Well, having to swipe in the opposite scrolling direction in Firefox breaks my muscle memory every single time I do this, to the point that my fingers are about to never attempt this gesture, which makes me sad because I found this a very useful gesture.  And needless to say, Firefox's behavior is different than all other apps here.
> Firefox's behavior is different than all other apps here.

*What* other apps?
(Reporter)

Comment 17

5 years ago
(In reply to comment #16)
> > Firefox's behavior is different than all other apps here.
> 
> *What* other apps?

Hmm, actually I may be confused.  I think the setting that I'm talking about has been removed from 10.8, or I can't find it any more for some reason.  I was mixing my experience with 10.6 I guess.  :/
Duplicate of this bug: 1094453
You need to log in before you can comment on or make changes to this bug.