Closed Bug 1601184 Opened 2 years ago Closed 2 years ago

toolkit.tabbox.switchByScrolling:true doesn't switch tabs when scrolling over empty space in tab bar


(Toolkit :: XUL Widgets, defect, P3)

71 Branch



Tracking Status
firefox-esr68 --- unaffected
firefox71 --- disabled
firefox72 --- disabled
firefox73 --- fixed


(Reporter: yoasif, Assigned: emilio)




(Keywords: regression)


(2 files)

As reported on

Steps to reproduce:

  1. Set toolkit.tabbox.switchByScrolling to true
  2. Restart Firefox (not sure this is required)
  3. Open three tabs in a maximized window (doesn't need to be maximized, but the window has to be wider than the width of the tabs)
  4. Hover over empty space to the right of the tabs, scroll up and down

What happens:


Expected result:

The same result as hovering over tabs or prior to bug 1514926

37:01.43 INFO: No more inbound revisions, bisection finished.
37:01.43 INFO: Last good revision: 94eaa02e0ea1725512893cd5139b1d200fcf4fdd
37:01.43 INFO: First bad revision: 5e221240fc1d537da612973800bbe24efa50736b
37:01.43 INFO: Pushlog:

Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Regressed by: 1514926
Flags: needinfo?(bgrinstead)

This event ( isn't retargeting outside of the tabbrowser-tabs arrowscrollbox shadow DOM (similar to these events:

We could either listen there in the tabbrowser-tabs arrowScrollbox and dispatch the event from the Shadow DOM, or make a new function and call it from there. Though I suspect this would continue to happen if/when other components start to use SD (i.e. <tab> contents). So it seems better to switch to the standard "wheel" event instead:

Flags: needinfo?(bgrinstead)

Bug 1575485 was a very similar issue

Priority: -- → P3
See Also: → 1575485
Attached image DOM-tree.png

Hm, switching to "wheel" has different behavior, it fires much more often so it rotates too quickly through the tabs.

Emilio, do you have any ideas here, or know who would? Basically we are currently relying on the non standard DOMMouseScroll to implement this (off by default) feature in tabs where scrolling changes the selected tab. The problem is that this event gets swallowed by the tabbrowser-tabs child arrowscrollbox's Shadow DOM (when you scroll to the right of any <tab> children), so it never fires on it.

The event is bound in the custom element at Switching this to "wheel" instead works but has weird behavior. Is there a way to capture the DOMMouseScroll from the parent of the shadow host?

Flags: needinfo?(emilio)

Makes sense to be consistent with wheel.

Assignee: nobody → emilio

Does the patch above fix it? (I can't build it atm, on a pretty shitty laptop).

In general, it'd be great if we used wheel and throttled it (which should be easy enough). But these events should probably be consistent with wheel.

I'll send for review if they fix the issue, otherwise I'll move to a different bug.

Flags: needinfo?(emilio) → needinfo?(bgrinstead)

Updating affected flags.

Just verified this does fix it.

Flags: needinfo?(bgrinstead)
Attachment #9113663 - Attachment description: Bug 1601184 - Make legacy mouse scroll events composed. → Bug 1601184 - Make legacy mouse scroll events composed. r=smaug

P3 and needs a manual preference flip to show the bug, wontfix 71.

Tell please, in which version of Firefox will this problem be fixed? I really need the tab scrolling function for any number of them.

(In reply to veron from comment #9)

Tell please, in which version of Firefox will this problem be fixed? I really need the tab scrolling function for any number of them.

The patch needs to be reviewed, then landed. That should happen pretty soon and then it'd land in Nightly. Not sure if we'd uplift the patch for 72, as it's a web-exposed change and thus there's some risk to it.

But once it lands you can use nightly which would contain the fix and would ship in FF73.

Pushed by
Make legacy mouse scroll events composed. r=smaug
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

AFAICT this pref is not exposed in preferences and is disabled by default.

Duplicate of this bug: 1607181
QA Whiteboard: [qa-73b-p2]
See Also: → 1592798

Firefox 73 - not fixed
Why do you write that in version 73 this problem is fixed? With the mouse wheel, the tabs scroll only visible, when it goes abroad, the tabs are not selected through the mouse wheel.

You need to log in before you can comment on or make changes to this bug.