When Ctrl+Tab panel is open the left and right arrow keys don't allow you to go back and forth in the list of visible tabs
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
People
(Reporter: whimboo, Assigned: kramerjaron)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 external file)
This was initially implemented in bug 449929 but as it looks like it regressed at some point.
Steps to reproduce:
- Have multiple tabs open
- Enable Ctrl+Tab in
about:preferences - Long press Ctrl+Tab to open the panel
- Release the tab key and press the left or right arrow keys to go back and forth the listed tabs
Expected:
Both array keys allow me to go back and forth in the list of open tabs
Currently:
The focused / selected tab doesn't change at all.
Comment 1•1 month ago
|
||
The severity field is not set for this bug.
:jsudiaman, could you have a look please?
For more information, please visit BugBot documentation.
Handle Ctrl+Left and Ctrl+Right while the preview panel is open, using the existing focus-cycling behavior and respecting RTL direction. Add browser coverage for both directions, wraparound, and selecting the previewed tab on Ctrl release.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Henrik, which OS/version and Firefox version/build reproduce this? If this is macOS, are Control+Left/Right assigned to Move left/right a space under Keyboard Shortcuts > Mission Control, and does disabling those shortcuts change the behavior while Ctrl+Tab is held? Review testing finds that the existing XUL buttons already navigate on Left/Right; platform details will help us reproduce the actual failure before changing key handling.
Updated•1 month ago
|
| Reporter | ||
Comment 4•1 month ago
|
||
This is still reproducible with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:160.0) Gecko/20100101 Firefox/160.0 ID:20261019215902 on macOS 26 (sorry for not mentioning the platform when filing this bug). And no, Mission Control doesn't have such a setting for me.
Comment 5•1 month ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #4)
This is still reproducible with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:160.0) Gecko/20100101 Firefox/160.0 ID:20261019215902 on macOS 26 (sorry for not mentioning the platform when filing this bug). And no, Mission Control doesn't have such a setting for me.
How about with System Settings › Keyboard › "Keyboard navigation"? Is that turned off, and does it help if you turn that on.
Comment 6•1 month ago
|
||
Also, what's your value for accessibility.tabfocus in about:config?
| Reporter | ||
Comment 7•1 month ago
|
||
(In reply to Dão Gottwald [:dao] from comment #6)
Also, what's your value for
accessibility.tabfocusin about:config?
That value shows the default value which is 7.
(In reply to Dão Gottwald [:dao] from comment #5)
How about with System Settings › Keyboard › "Keyboard navigation"? Is that turned off, and does it help if you turn that on.
I always have this turned on. So that's not the problem here.
Thanks, Henrik. Bug 2074863 comment 4 and bug 2074863 comment 7 establish macOS 26 / build 20261019215902, Keyboard navigation enabled, and accessibility.tabfocus=7; I won't ask you to repeat those settings.
I traced the existing path: ctrlTab.setupGUI focuses a preview button, and button.js handles Left/Right on keypress using the parent's computed direction and commandDispatcher focus movement. The Cocoa TextInputHandler can dispatch keypress through DoCommandBySelector or the HandleKeyDownEvent fallback; the shared keypress eligibility check does not exclude arrow keys. That source inspection does not establish which events your physical keystrokes actually deliver, or whether preview focus remains correct on your Mac. The earlier synthetic macOS try results therefore don't settle this failure.
Could you run the attached diagnostic in the Browser Console (chrome command line, not a page's Web Console), switch back to the normal browser window, open Ctrl+Tab, release Tab while continuing to hold Ctrl, and press Left then Right? Please return to the Browser Console and run:
Services.wm.getMostRecentWindow("navigator:browser").__ctrlTabProbe.stop()
Please attach the returned JSON. The probe records only Tab/Control/Left/Right events and chrome focus/index state, not typed text or page URLs. It doesn't change keyboard handling or preferences, and removes its listeners automatically after 60 seconds (or immediately with stop()).
I've checked the probe with real XUL focus and EventUtils events on Linux Nightly: it captures keypress and the before/after focus transition for both arrows, and removes its listeners correctly. This is validation of the diagnostic, not a macOS reproduction. A trace with no arrow keydown, keydown without keypress, or keypress with the wrong/unchanged focused preview would distinguish the next investigation paths. The production interception remains removed and D330163 remains test-only; I don't yet have evidence for a production fix. Phabricator's read APIs currently return HTTP 406, so I also cannot freshly verify/update the revision there.
| Reporter | ||
Comment 9•23 days ago
|
||
I did the steps you mentioned by pressing the left and right keys after releasing the tab key. But the probe code doesn't detect that both arrow keys were pressed at all:
{
"version": "160.0a1",
"build": "20261019215902",
"rows": [
{
"ms": 122744058,
"phase": "capture",
"type": "keydown",
"key": "Control",
"ctrl": true,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "browser",
"prevented": false,
"panel": "closed",
"selectedIndex": 1,
"internalIndex": 1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122744058,
"phase": "after",
"type": "keydown",
"key": "Control",
"ctrl": true,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "browser",
"prevented": false,
"panel": "closed",
"selectedIndex": 1,
"internalIndex": 1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122744758,
"phase": "capture",
"type": "keydown",
"key": "Tab",
"ctrl": true,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "browser",
"prevented": false,
"panel": "closed",
"selectedIndex": 1,
"internalIndex": 1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122744760,
"phase": "after",
"type": "keydown",
"key": "Tab",
"ctrl": true,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "browser",
"prevented": true,
"panel": "closed",
"selectedIndex": 1,
"internalIndex": 1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122744894,
"phase": "capture",
"type": "keyup",
"key": "Tab",
"ctrl": true,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "browser",
"prevented": false,
"panel": "closed",
"selectedIndex": 1,
"internalIndex": 1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122744894,
"phase": "after",
"type": "keyup",
"key": "Tab",
"ctrl": true,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "browser",
"prevented": true,
"panel": "closed",
"selectedIndex": 1,
"internalIndex": 1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122744978,
"type": "popupshown",
"panel": "open",
"selectedIndex": 1,
"internalIndex": 1,
"active": "body",
"activeIndex": -1,
"focused": null,
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122748844,
"phase": "capture",
"type": "keyup",
"key": "Control",
"ctrl": false,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "button",
"prevented": false,
"panel": "open",
"selectedIndex": 1,
"internalIndex": -1,
"active": "button",
"activeIndex": 1,
"focused": "button",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122748844,
"type": "popuphiding",
"panel": "hiding",
"selectedIndex": 1,
"internalIndex": -1,
"active": "button",
"activeIndex": 1,
"focused": "button",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
},
{
"ms": 122748857,
"phase": "after",
"type": "keyup",
"key": "Control",
"ctrl": false,
"alt": false,
"meta": false,
"shift": false,
"repeat": false,
"trusted": true,
"target": "button",
"prevented": true,
"panel": "closed",
"selectedIndex": -1,
"internalIndex": -1,
"active": "browser",
"activeIndex": -1,
"focused": "browser",
"browserActive": true,
"documentFocused": true,
"direction": "ltr"
}
]
}
| Assignee | ||
Comment 10•22 days ago
|
||
Thanks for the physical trace in bug 2074863 comment 9. It records no arrow keydown, keypress, or keyup in the monitored browser window. That does not distinguish OS/AppKit interception from Firefox native routing or a gap in the probe. In particular, the first probe filtered event.key and observed just one window; it did not observe native NSEvents.
The popupshown sample is also too early to establish a focus bug: our listener was installed before tabPreviewPanelHelper.opening registers the listener that calls ctrlTab.setupGUI. The probe can therefore sample before setupGUI focuses the button. By Control keyup, your trace shows internalIndex=-1 and activeIndex=1 with the preview button focused. There is no evidence here for restoring the proposed keydown interception: it cannot help if the arrow never reaches that DOM path.
The attached v2 probe also recognizes arrow event.code/keyCode, observes all browser windows open when installed, and samples popup focus again on the next event-loop turn. It leaves event handling unchanged. I checked both arrow focus transitions, the deferred popup focus sample, and listener cleanup on Linux Nightly; this is not macOS reproduction.
Could you capture one short sequence with v2: plain Left/Right outside the panel as a baseline, Ctrl+Left/Right outside the panel, then Ctrl+Tab with Tab released and Ctrl held while pressing Left/Right? Stop and retrieve the JSON using the same __ctrlTabProbe.stop() command from bug 2074863 comment 8. Also note whether the outside-panel Ctrl+Arrow presses move a Space or do anything else.
For the same short sequence, a native log would locate the earlier boundary: in about:logging select Custom, set modules to KeyboardHandler:5, choose logging to a file, start, reproduce, and stop. This module logs TextInputHandler::HandleKeyDownEvent's native keyCode/modifiers and dispatch decisions. Capture only that sequence and stop before typing unrelated text, since this log includes key data. If physical arrows appear there but not in v2, investigate native-to-DOM routing; if absent there too, the next boundary is earlier AppKit/OS routing, not proven OS interception. Please attach the short log and v2 JSON. No production code change is justified yet.
| Reporter | ||
Comment 11•22 days ago
|
||
| Reporter | ||
Comment 12•22 days ago
|
||
| Assignee | ||
Comment 13•21 days ago
|
||
Thanks for both attachments. They narrow this down:
- In attachment 9670345 [details], plain Left/Right are captured with matching key, code and keyCode. No arrow event with ctrl=true appears, including keyup. The deferred popupshown sample has internalIndex=-1, activeIndex=1 and focused="button"; preview 1 is focused before the wait for Control release. This does not show a persistent setupGUI focus failure.
- Attachment 9670353 [details] contains native HandleKeyDownEvent entries for plain Left (keyCode 123), plain Right (124), and Ctrl+Tab (48), plus Control modifier transitions. There are no arrow entries while Control is held. Thus the supplied native log does not show those modified arrows reaching TextInputHandler at all; this is earlier than button.js keypress handling, not evidence that button.js discards them. The files are separate captures, so I am not treating their timestamps as a synchronized trace.
This supports investigating earlier native/AppKit/system shortcut routing. It does not prove which component consumes the combination. ChildView::_wantsKeyDownForEvent accepts keydowns after the menu system declines them, and ChildView::keyDown forwards to TextInputHandler when present; KeyboardHandler logging starts at the latter boundary, not at the OS event source. Restoring the proposed DOM keydown interception would not address events missing before that boundary, so I am leaving production code unchanged.
Two targeted checks would help distinguish a system-wide binding from Firefox-specific routing: do Ctrl+Left/Right switch a Space (or otherwise act) in another application as well as outside the Ctrl+Tab panel? Since the Mission Control shortcut setting wasn't visible in your UI, could you also attach the output of this read-only Terminal command, which inspects stored symbolic shortcut settings without changing them?
defaults read com.apple.symbolichotkeys AppleSymbolicHotKeys
If a keyboard remapper/shortcut utility is running, does temporarily disabling its Ctrl+Arrow rule change the result? These are hypotheses to test, not a conclusion that your configuration is at fault. No new probe or repeated Keyboard navigation/tabfocus check is needed. I have not reproduced this on macOS, and the current test-only revision remains Changes Planned.
| Reporter | ||
Comment 14•17 days ago
|
||
(In reply to Jaron from comment #13)
Two targeted checks would help distinguish a system-wide binding from Firefox-specific routing: do Ctrl+Left/Right switch a Space (or otherwise act) in another application as well as outside the Ctrl+Tab panel? Since the Mission Control shortcut setting wasn't visible in your UI
No, Spaces is not active for me and when pressing this shortcut outside of Firefox nothing happens.
, could you also attach the output of this read-only Terminal command, which inspects stored symbolic shortcut settings without changing them?
defaults read com.apple.symbolichotkeys AppleSymbolicHotKeys
{
15 = {
enabled = 0;
};
16 = {
enabled = 0;
};
164 = {
enabled = 0;
value = {
parameters = (
65535,
65535,
0
);
type = standard;
};
};
17 = {
enabled = 0;
};
18 = {
enabled = 0;
};
19 = {
enabled = 0;
};
20 = {
enabled = 0;
};
21 = {
enabled = 0;
};
22 = {
enabled = 0;
};
23 = {
enabled = 0;
};
24 = {
enabled = 0;
};
25 = {
enabled = 0;
};
26 = {
enabled = 0;
};
60 = {
enabled = 1;
value = {
parameters = (
32,
49,
262144
);
type = standard;
};
};
61 = {
enabled = 1;
value = {
parameters = (
32,
49,
786432
);
type = standard;
};
};
79 = {
enabled = 1;
};
80 = {
enabled = 1;
};
81 = {
enabled = 1;
};
82 = {
enabled = 1;
};
}
Based on this output it's really picked OS wide and indeed its Mission Control which I never used or configured. After disabling the shortcuts there (I had to expand a subsection which I didn't notice before) it now works great in Firefox.
Now I checked Ctrl+Shift+Right/Left and that's actually working in Firefox. It's a bit annoying that we have to use different shortcuts between different platforms as it looks like.
Description
•