Closed Bug 1959023 Opened 8 months ago Closed 5 months ago

Firefox menu bar changes and incorrect menu opens when window is inactive

Categories

(Core :: Widget: Cocoa, defect, P3)

Firefox 138
Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
142 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- verified
firefox137 --- unaffected
firefox138 --- wontfix
firefox139 --- wontfix
firefox140 --- wontfix
firefox141 --- wontfix
firefox142 --- verified

People

(Reporter: sam, Assigned: bradwerth)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached video Screen recording

After bug 1941595, when using Firefox with multiple monitors on macOS, the Firefox menu bar options change when activating a window on another monitor. While this is annoying, it also causes undesirable behavior: When you try to open the Tools menu, the Profiles menu opens instead, because the Profiles option gets added when Firefox comes to the foreground.

Steps to reproduce:

  1. Open Finder window on screen A.
  2. Open Firefox window on screen B.
  3. Note that when the Firefox window is active, the menu bar has a Profiles menu.
  4. Click the Finder window to activate it. Notice that the Profiles menu disappears from the Firefox menu bar on screen B.
  5. Attempt to open the Firefox tools menu (without first activating the Firefox window). Note that Profiles opens instead.

See attached screen recording demonstrating the issue.

OS: Unspecified → macOS
Hardware: Unspecified → Desktop

Set release status flags based on info from the regressing bug 1941595

:bradwerth, since you are the author of the regressor, bug 1941595, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Bug 1941595 (whose fix caused this bug) was a regression caused by the fix for bug 1765391. The fix for bug 1765391 landed on the 135 branch. Could you test with FF 134 to see if this bug also happens there? You can download it here.

When you run FF 134, to keep it from automatically updating you'll need to set "Firefox Updates" to "Check for updates but let you choose to install them".

I'll get to work on this.

Assignee: nobody → bwerth
Flags: needinfo?(bwerth)
Severity: -- → S3
Priority: -- → P3

(In reply to Sam Johnson from comment #0)

Thank you for filing. I know that macOS Firefox has an issue where sometimes there is a "Profiles" menu and sometimes there is not, but I can't get your Steps to Reproduce to work for me. Please help me understand better, and maybe I will be able to reproduce.

Steps to reproduce:

  1. Open Finder window on screen A.

The menubar is on screen A, yes?

  1. Open Firefox window on screen B.

I am dragging a new Firefox window from screen A to screen B. Should I be doing something else?

  1. Note that when the Firefox window is active, the menu bar has a Profiles menu.
  2. Click the Finder window to activate it. Notice that the Profiles menu disappears from the Firefox menu bar on screen B.

Which screen has the Finder window? When I click on a Finder window (on either screen), I get the Finder menubar, as I should. There seems no possible way that clicking on a Finder window would leave me with the Firefox menubar. Also, the menubar is on screen A, not screen B, unless there's some other step I should be taking to get it on screen B.

  1. Attempt to open the Firefox tools menu (without first activating the Firefox window). Note that Profiles opens instead.

Thanks. I know there is a real issue here, I just need to be able to reproduce the Bug properly so I can be sure my changes will fix it.

Flags: needinfo?(sam)

(In reply to Brad Werth [:bradwerth] from comment #4)

Hi! No problem:

The menubar is on screen A, yes?

Which screen has the Finder window? When I click on a Finder window (on either screen), I get the Finder menubar, as I should. There seems no possible way that clicking on a Finder window would leave me with the Firefox menubar. Also, the menubar is on screen A, not screen B, unless there's some other step I should be taking to get it on screen B.

There should be menu bars on every screen. You must enable "Displays have separate spaces" in System Settings > Desktop > Mission Control (which is enabled by default) for this to be the case. I'm guessing this is the source of the confusion.

I am dragging a new Firefox window from screen A to screen B. Should I be doing something else?

No dragging is required :)

Flags: needinfo?(sam)

Set release status flags based on info from the regressing bug 1941595

Adding a need-info for Comment 5.

I've confirmed that D242071 fixes this issue, while introducing other unwanted side effects. I'm working on a more robust fix.

Flags: needinfo?(bwerth)

This prevents windowDidResignMain from altering the menubar when Firefox
is not the active app. This avoids menubar changes on multiple monitors
when switching from one window to another. When Firefox becomes active
again, it will update its menubar, which is typically the same menubar
as it had before.

This also prevents the momentary appearance of a gray, disabled-looking
menubar when quitting.

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch

The patch landed in nightly and beta is affected.
:bradwerth, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(bwerth)
Flags: needinfo?(bwerth)
QA Whiteboard: [qa-triage-done-c143/b142][qa-ver-needed-c143/b142]
Flags: qe-verify+

Reproduced the initial issue using Firefox 141 with two monitors on macOS 15.
Verified as fixed using Firefox 142.0b4 with 2 monitors on macOS 15 - the Profiles menu no longer disappears when changing the focus to another app from the other monitor.

QA Contact: sbadau
QA Whiteboard: [qa-triage-done-c143/b142][qa-ver-needed-c143/b142] → [qa-triage-done-c143/b142][qa-ver-done-c143/b142]
Flags: qe-verify+
No longer regressions: 1980815

Should we uplift this to ESR140? It cherry-picks cleanly.

Flags: needinfo?(bwerth)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #15)

Should we uplift this to ESR140? It cherry-picks cleanly.

Yes we should. I'll request uplift.

Flags: needinfo?(bwerth)

Comment on attachment 9497179 [details]
Bug 1959023 Part 1: Only set the macOS menubar when the app is active.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: macOS menubar is one of the most visible interface elements. If it appears darkened, users think the app is broken in more serious ways.
  • User impact if declined: Users will see a disabled-looking menubar in some situations.
  • Fix Landed on Version:
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This patch was incorrectly associated with a regression. It changes some fundamental UI code that could cause such regressions.
Attachment #9497179 - Flags: approval-mozilla-esr140?

Comment on attachment 9497179 [details]
Bug 1959023 Part 1: Only set the macOS menubar when the app is active.

Approved for 140.3esr.

Attachment #9497179 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
Attachment #9497180 - Flags: approval-mozilla-esr140+

Verified as fixed using Firefox 140.3.0 on macOS 15 with two monitors. The Profiles option is present on the second monitor, and the correct options are displayed when clicking the Tools menu.

Status: RESOLVED → VERIFIED
Blocks: 1988364
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: