Closed Bug 1703980 Opened 5 years ago Closed 4 years ago

On macOS, tooltips and non-native context menus have white-on-white text in the combination Firefox Dark + macOS Light, if widget.macos.respect-system-appearance is enabled

Categories

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

Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
91 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox87 --- unaffected
firefox88 --- unaffected
firefox89 --- disabled
firefox90 --- disabled
firefox91 --- verified

People

(Reporter: nhnt11, Unassigned)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [mac:darkmode][proton-tooltip])

Attachments

(1 file)

Screenshot attached!

I'm on macOS Catalina 10.15.7, and I've got macOS's dark mode disabled, and Firefox's theme set to Dark. I've tried clearing out all the proton prefs I'd previously set, updating Nightly, etc., and the problem persists. Screenshot attached.

Do you have widget.macos.respect-system-appearance set to true?

Component: Menus → Widget: Cocoa
Flags: needinfo?(nhnt11)
Product: Firefox → Core
Version: unspecified → Trunk

(In reply to Markus Stange [:mstange] from comment #1)

Do you have widget.macos.respect-system-appearance set to true?

Huh, I do indeed! I don't remember ever setting that - I wonder if it was from a study or something?

Anyway, setting it to false immediately fixed the issue. Also, FWIW I had widget.macos.native-context-menus=false. Setting THAT to true, along with the other one, resulted in a dark context menu with light text, which looks correct for macOS dark mode. Though as I said, I have macOS dark mode disabled and Firefox dark theme enabled.

Thanks!

Flags: needinfo?(nhnt11)

(In reply to Nihanth Subramanya [:nhnt11] from comment #2)

resulted in a dark context menu with light text, which looks correct for macOS dark mode. Though as I said, I have macOS dark mode disabled and Firefox dark theme enabled.

This is pretty weird, because AIUI with those prefs set we're using native APIs to show the context menu, so I don't understand why it would then not obey macOS settings for dark mode. But I can reproduce this...

Something similarly broken also seems to happen to sheets - if in this configuration you go to about:support and click the "Troubleshooting mode..." button (while bug 1685346 is still unfixed), the resulting sheet has a dark background but also dark text (!) which makes it very hard to read. Markus, do you know what's causing this?

Flags: needinfo?(mstange.moz)
Whiteboard: [proton-context-menus]

This bug also applies to tooltips, which will remain non-native.
Ok, so what happens here is that system colors respect the document's lwtheme, -moz-default-appearance drawing respects the document's lwtheme, but popup widget vibrancy does not follow the document's lwtheme. We only set the "override appearance" on the document's top level widget, not on the popup widgets inside it.
We will need to find a way to set the appearance on popup widgets based on the document's lwtheme. Or maybe a way to obtain the document's top level widget's NSWindow, and use that as the popup NSWindow's appearanceSource.

(In reply to :Gijs (he/him) from comment #3)

(In reply to Nihanth Subramanya [:nhnt11] from comment #2)

resulted in a dark context menu with light text, which looks correct for macOS dark mode. Though as I said, I have macOS dark mode disabled and Firefox dark theme enabled.

This is pretty weird, because AIUI with those prefs set we're using native APIs to show the context menu, so I don't understand why it would then not obey macOS settings for dark mode. But I can reproduce this...

Which macOS version is this on? The AppKit release notes for Big Sur say that you can override the appearance of native context menus starting with Big Sur, and we have code in place to have native context menus get their appearance from the system instead of the parent window. But maybe the inheriting is also happening pre-Big Sur?

Something similarly broken also seems to happen to sheets

This was filed as bug 1704016.

Flags: needinfo?(mstange.moz)
Blocks: 1623686
No longer blocks: proton-context-menus
Keywords: regression
Regressed by: 1700294
Summary: On macOS, context menu foreground color is too light with the Firefox Dark theme when macOS dark mode is disabled → On macOS, tooltips and non-native context menus have white-on-white text in the combination Firefox Dark + macOS Light, if widget.macos.respect-system-appearance is enabled
Whiteboard: [proton-context-menus] → [mac:darkmode][mac:mr1]
Has Regression Range: --- → yes

(In reply to Markus Stange [:mstange] from comment #4)

Which macOS version is this on?

I'm on macOS Catalina 10.15.7.

(In reply to Nihanth Subramanya [:nhnt11] from comment #5)

I'm on macOS Catalina 10.15.7.

Thanks, I've filed bug 1704102 for the native context menu issue.

See Also: → 1703876

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

Martin, can you please help set a priority for this one?

Flags: needinfo?(mbalfanz)

It's an important issue, marking it as a P2. However, note that work that requires widget.macos.respect-system-appearance set to true (bug 1623686) will be post-mr1.

Flags: needinfo?(mbalfanz)
Priority: -- → P2
Whiteboard: [mac:darkmode][mac:mr1] → [mac:darkmode]

Thanks, Pascal FYI with widget.macos.respect-system-appearance being default off on 89 it sounds like this should not be tracked as a 89 regression?

Flags: needinfo?(pascalc)

Marking as disabled for 89 since it requires setting a pref to a non-default value.

Flags: needinfo?(pascalc)
Whiteboard: [mac:darkmode] → [mac:darkmode][proton-tooltip]
Depends on: 1715145

This is fixed for me now that bug 1715145 has landed. Please let me know if you can still reproduce the issue.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

I have reproduced this issue using Firefox 89.0a1 (2021-04-08) on macOS 10.15
I can confirm this issue is fixed, I verified using Firefox 91.0b4 macOS 10.15, I mention that the pref widget.macos.respect-system-appearance was renamed to widget.macos.support-dark-appearance (see: bug 1715145, comment 3).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: