Wake/Focus bug in split monitor on MacOs
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: polo.fgt, Assigned: spohl, NeedInfo)
References
Details
Attachments
(1 file, 1 external file, 1 obsolete file)
|
2.18 MB,
video/quicktime
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:150.0) Gecko/20100101 Firefox/150.0
Steps to reproduce:
On MacOs (tested on sequoia and Tahoe, not tested on other OS), using an external monitor, the window doesn't focus when we "right click>new tab on the right", but it does when we "right click>new tab". Very frustrating
Actual results:
The window doesn't awake, the focus is kept on the other monitor
Expected results:
It should focus automatically the research area as it does when we "right click>new tab or when we simply left click on the "+" new tab
Comment 1•6 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 2•6 months ago
|
||
gBrowser.addAdjacentNewTab (the handler for the tab context menu's "New
Tab to Right" / "New Tab Below" item) creates the new tab through
addTrustedTab directly and never raises the chrome window. On macOS,
the tab context menu can be invoked on a window without that window
becoming frontmost — most reproducibly in a multi-monitor setup where
the user right-clicks a tab in a Firefox window that wasn't the OS-level
frontmost window. The new tab is then created in the right window and
its focusUrlBar: true state is set, but OS keyboard focus stays on
whichever window was frontmost, so the address bar can't actually be
typed into.
The plain "New Tab" command goes through
URILoadingHelper.openLinkIn, which calls aWindow.focus() before
loading the URI for exactly this reason. Mirror that here so both paths
behave the same: focus the chrome window, then create the tab and let
the existing focusUrlBar state place keyboard focus on the address
bar.
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Comment 3•6 months ago
|
||
The tab context menu's "New Tab to Right" and the tab group menu's
"New tab in group" both create the new tab through
gBrowser.addAdjacentNewTab and ask it to focus the address bar. On
macOS, those menus can be invoked on a window that isn't the OS-level
frontmost window -- most reproducibly in a multi-monitor setup, where
the user right-clicks a tab in a Firefox window that wasn't the
frontmost OS window. The new tab is then created in the right window
and its focusUrlBar: true request is honored within that window, but
OS keyboard focus stays on whichever window was frontmost, so the
address bar can't actually be typed into.
URILoadingHelper.openLinkIn handles this for the plain "New Tab"
command by calling aWindow.focus() before loading the URI. Mirror
that at the menu call sites rather than inside addAdjacentNewTab
itself, so gBrowser stays agnostic about who's calling it. The
non-menu caller in SpecialMessageActions is left untouched.
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Comment 4•5 months ago
|
||
N-i regarding the question on phabricator. Thanks!
Updated•4 months ago
|
Description
•