Option to disable mousewheel scroll on tab bar

RESOLVED FIXED in seamonkey2.6

Status

SeaMonkey
Tabbed Browser
--
enhancement
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Stefan A. Möller, Assigned: Philip Chee)

Tracking

Trunk
seamonkey2.6
Dependency tree / graph

SeaMonkey Tracking Flags

(seamonkey2.6 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

6 years ago
From bug 661450:
>> When I'm scrolling through a page with the mouse wheel, if I happen to let
>> the cursor drift over the tab bar, or move it up there so as to not block
>> my view of the page content, rolling the wheel switches the view to
>> another tab. Very annoying and jarring.
>
> Invalid. This is deliberate.
> Now that bug 484968 is fixed, the scrollable tabbar eats the wheel events.

Deliberate or not, it *is* annoying. Therefore I request an option (in about:config) to disable mousewheel scroll on the tab bar.
(Reporter)

Updated

6 years ago
Depends on: 484968, 643294, 661450

Comment 1

6 years ago
Confirmed.

There should be a Preference item to disable this "feature".
(Assignee)

Updated

6 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

6 years ago
If this is done, it should be done for tabmail too.
(Assignee)

Comment 3

6 years ago
Does scrolling the scroll wheel change the selected tab in tabmail?
(Reporter)

Comment 4

6 years ago
No, it doesn't.

Comment 5

6 years ago
Would be possible to make the behaviour like in Opera? Right click and hold + wheel to scroll between tabs? This would solve the problem in an elegant way, though. What do you think about it?

Updated

6 years ago
OS: Windows 2000 → All
Hardware: x86 → All
Version: SeaMonkey 2.2 Branch → Trunk
(Assignee)

Comment 6

6 years ago
> Would be possible to make the behaviour like in Opera? Right click and hold +
> wheel to scroll between tabs? This would solve the problem in an elegant way,
> though. What do you think about it?
Certainly sounds possible. Anybody else think this is a good idea?

Comment 7

6 years ago
Needing *some* other action for tab scrolling indeed should be a good idea to prevent accidental tab changes when you just meant to scroll the content. It should be better than some preference in that it can be done easily on the fly.

I'm not sure if right-click + wheel would conflict with the context menu, which only shows up after releasing the mouse button. Currently, keeping the mouse button down still allows tab scrolling (testing on Windows 7), so that might work. The other option would be a combination of wheel + Shift or Ctrl key.

Comment 8

6 years ago
> Needing *some* other action for tab scrolling ... should be better than some preference
> in that it can be done easily on the fly

No problem with that, but there still should be a Preference to disable entirely.  Or even a multipurpose pref.  0 to disable, 1 to enable as is, 2 to enable in conjunction with some action key ...

Comment 9

6 years ago
I have to say, I never ever had problems with the current behavior. Would be good to ask more people what they think about it. May be a preference with 3 options one of which would be disabled?

value = 0; disabled
value = 1; current behavior
value = 2; right button needed
(Assignee)

Comment 10

6 years ago
Created attachment 555450 [details] [diff] [review]
Patch v1.0 Minimalist Patch using SHIFT key.

In Firefox the vertical scroll wheel scrolls the tab bar but doesn't change the focused tab. In the following minimalist patch I'll revert our behaviour to that of Firefox since that's the behaviour that most people are familiar with. To switch the selected tab using the vertical scroll wheel, I've chosen the SHIFT key as the simplest option.

Holding down the right button: I'm using a trackpad with an emulated scrollwheel. Trying to hold down the right button at the same time as trying to scroll aggravates my RSI.

No preferences at the moment because I don't think that's necessary.
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #555450 - Flags: feedback?(rsx11m.pub)
Attachment #555450 - Flags: feedback?(jh)
Comment on attachment 555450 [details] [diff] [review]
Patch v1.0 Minimalist Patch using SHIFT key.

I think the Shift approach is good for defaults (i.e. revert the default to just scrolling the tab bar, but have it overridable on a case-by-case basis), but personally I'd still like to be able to set a pref (hidden, if you want) and get the current behavior. The reason is that Shift is on the keyboard, and I like selecting/switching tabs solely using the mouse. I cannot provide numbers, but I'm sure I'm not alone there.

IOW, f=me if you add a hidden pref (duplicate the handler etc.). Since that's not exactly what this patch does, but partly, I'll reset your request instead of setting f-.
Attachment #555450 - Flags: feedback?(jh)
(Assignee)

Comment 12

6 years ago
Created attachment 556033 [details] [diff] [review]
Patch v1.1 Use a pref to control behaviour.

Now controlled by a hidden preference:

// Mouse wheel action when over the tab bar:
// false  The mouse wheel scrolls the whole tab bar like Firefox (default).
// true   The mouse wheel advances the selected tab.
pref("browser.tabs.mouseScrollAdvance", false)

Holding the shift key reverses the preference.

This preference is read once when the tabbrowser opens. To see changes to the preference, open a new window, or restart.

The DOMMouseScroll handler is now more extension friendly. It calls a method _handleMouseScroll() which can be overridden by extensions. For example some people would like for the scroll wheel to do nothing at all over the tab bar. An extension can extend _handleMouseScroll() to add this behaviour.
Attachment #555450 - Attachment is obsolete: true
Attachment #555450 - Flags: feedback?(rsx11m.pub)
Attachment #556033 - Flags: feedback?(stefanh)
Attachment #556033 - Flags: feedback?(rsx11m.pub)
Attachment #556033 - Flags: feedback?(jh)
Comment on attachment 556033 [details] [diff] [review]
Patch v1.1 Use a pref to control behaviour.

Functionally exactly what I'd like to see, so f=me. Thanks!

I'm not your reviewer, but if I was I'd probably ask for renaming the pref to include "Tab" at the end and rename the member variable accordingly. If it wasn't for compatibility, even the method should be renamed (after all, we're not advancing the selected tab but the selection!).
Attachment #556033 - Flags: feedback?(jh) → feedback+

Comment 14

6 years ago
Comment on attachment 556033 [details] [diff] [review]
Patch v1.1 Use a pref to control behaviour.

Cancelling this since I don't have a mouse to test with.
Attachment #556033 - Flags: feedback?(stefanh)
(Assignee)

Comment 15

6 years ago
Comment on attachment 556033 [details] [diff] [review]
Patch v1.1 Use a pref to control behaviour.

I guess it's time to ask for a review.
Attachment #556033 - Flags: review?(neil)
Comment on attachment 556033 [details] [diff] [review]
Patch v1.1 Use a pref to control behaviour.

>+// Mouse wheel action when over the tab bar:
>+// false  The mouse wheel scrolls the whole tab bar like Firefox (default).
>+// true   The mouse wheel advances the selected tab.
>+pref("browser.tabs.mouseScrollAdvance", false);
We should have an override in our Linux pref block (about 100 lines from the end of browser-prefs.js) to make the default true on Linux, to match the tabbox behaviour.

>+          this.mScrollSelectedTab = this.mPrefs.getBoolPref("browser.tabs.mouseScrollAdvance");
We don't actually bother caching prefs anywhere else in tabbrowser.

Comment 17

6 years ago
Comment on attachment 556033 [details] [diff] [review]
Patch v1.1 Use a pref to control behaviour.

Patch applied to Linux trunk, and it's working fine there with the default being to require Shift being held down to scroll tabs. I think that's better than the alternate proposal with the right-click, given any coordination efforts with the context menu, thus f=me as well.

(In reply to neil@parkwaycc.co.uk from comment #16)
> >+pref("browser.tabs.mouseScrollAdvance", false);
> We should have an override in our Linux pref block (about 100 lines from the
> end of browser-prefs.js) to make the default true on Linux, to match the
> tabbox behaviour.

Using both Windows and Linux in parallel, my personal thinking is to keep the default consistent among platforms, but there apparently is already another instance of a similar setting having different defaults for Linux introducing such inconsistency.

> >+          this.mScrollSelectedTab = this.mPrefs.getBoolPref("browser.tabs.mouseScrollAdvance");
> We don't actually bother caching prefs anywhere else in tabbrowser.

Doing this once in the constructor only has also the potentially confusing effect that the change isn't visible immediately in the current window and only applies for new windows. I didn't try it, but not caching the pref value in this way should have the advantage of any changes being effective immediately also in the current window.
Attachment #556033 - Flags: feedback?(rsx11m.pub) → feedback+
(Assignee)

Comment 18

6 years ago
Created attachment 560297 [details] [diff] [review]
Patch v1.0 Don't cache the pref. f=jh f=rsx11m.

> neil@parkwaycc.co.uk      2011-09-04 15:55:44 PDT
> 
> Comment on attachment 556033 [details] [diff] [review] [diff] [details] [review]
> Patch v1.1 Use a pref to control behaviour.
> 
>>+// Mouse wheel action when over the tab bar:
>>+// false  The mouse wheel scrolls the whole tab bar like Firefox (default).
>>+// true   The mouse wheel advances the selected tab.
>>+pref("browser.tabs.mouseScrollAdvance", false);
> We should have an override in our Linux pref block (about 100 lines from the end of browser-prefs.js) to make the default true on Linux, to match the tabbox behaviour.
Fixed.

>>+          this.mScrollSelectedTab = this.mPrefs.getBoolPref("browser.tabs.mouseScrollAdvance");
> We don't actually bother caching prefs anywhere else in tabbrowser.
Fixed.
Attachment #556033 - Attachment is obsolete: true
Attachment #556033 - Flags: review?(neil)
Attachment #560297 - Flags: review?(neil)

Updated

6 years ago
Attachment #560297 - Flags: review?(neil) → review+
(Assignee)

Comment 19

6 years ago
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/5298d97973c4
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
status-seamonkey2.6: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.6
You need to log in before you can comment on or make changes to this bug.