Closed Bug 1475520 Opened 7 years ago Closed 4 years ago

macOS dark mode should apply to context menus

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fix-optional

People

(Reporter: ntim, Assigned: mstange)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [mac:darkmode][mac:mr1])

Attachments

(8 files)

No description provided.
Priority: -- → P2
Whiteboard: [ntim-backlog]
Summary: Mojave dark theme should apply to context menus → [10.14] Mojave dark theme should apply to context menus
Whiteboard: [ntim-backlog]
From my duplicate bug, perhaps related: > I’m also noticing that Nightly is using a "Light" UI for other parts, such as the application's title bar which appears in fullscreen mode or when ticking "Title Bar" in Customize.
See Also: → 1553682
Blocks: 1466335
See Also: → 1569693
See Also: 1569693

Eh. It's still broken - and that's very annoying.

Related:

  • bug 1559646 Native titlebar doesn't respect dark mode on Mac
  • bug 1561725 Blank page is white under Mac OS dark mode

Hi,
this bug is also present on macOS Catalina official release (10.15 19A583) with Firefox 70 beta14.

Summary: [10.14] Mojave dark theme should apply to context menus → macOS dark mode should apply to context menus
Attached image Dialog box

This bug apply not only to context menus but also for dialog boxes like "Save page as", "Open file" etc. which also should be dark but remains light.
Other browsers like Safari or Chromium based browsers already have complete dark mode support.
It would be nice to have this also in Firefox.

Do you guys know if there's any progress with this bug?

Flags: needinfo?(ntim.bugs)

(In reply to emikaadeo from comment #13)

Do you guys know if there's any progress with this bug?

https://bugzilla.mozilla.org/show_bug.cgi?id=mojave-sdk will probably help here, it's probably not going to get fixed any time soon however.

See Also: → 1525362
Depends on: mojave-sdk

Seems this issue is getting worse. All popups in Firefox 70.0.1 still have bright background, but now they also have white text.

Am I missing something, why isn't there at least a workaround incorporated into Firefox yet? Since a real fix does not seem to appear that soon, it would just make sense to disable macOS dark mode on app start:

- (void)applicationDidFinishLaunching:(NSNotification*)notification {

    // prevent macOS dark mode for this app (since not supported by Firefox)
    if (@available(macOS 10.14, *))
        NSApp.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];

    ...
}

If the required macOS 10.14 SDK is not available on the build server, then you can still call this setter by calling the fundamental Objective-C C-function objc_msgSend() and passing the respective setter as string and value as raw argument.

(In reply to cniff from comment #17)

Am I missing something, why isn't there at least a workaround incorporated into Firefox yet?

Are you building your own version of Firefox ? If so, this is a known issue when building with the 10.14 SDK (see bug 1578917). Official Firefox builds don't have this issue since they build with the 10.11 SDK.

Since a real fix does not seem to appear that soon, it would just make sense to disable macOS dark mode on app start:

If you have a proper fix in hand, feel free to submit a patch and we'll gladly accept it :) Building with the 10.14/15 SDK is something we want to do eventually.

Flags: needinfo?(firefox_bugs)

(In reply to Tim Nguyen :ntim from comment #18)

Are you building your own version of Firefox ? If so, this is a known issue when building with the 10.14 SDK (see bug 1578917). Official Firefox builds don't have this issue since they build with the 10.11 SDK.

No, that screen shot was taken with official Firefox 70.0.1 build (not a self rolled Firefox binary), running on macOS Mojave 10.14.6 with macOS dark mode enabled.

If you have a proper fix in hand, feel free to submit a patch and we'll gladly accept it :) Building with the 10.14/15 SDK is something we want to do eventually.

I thought I did with my previous comment... kind of. ;-)

Flags: needinfo?(firefox_bugs)

(In reply to cniff from comment #19)

(In reply to Tim Nguyen :ntim from comment #18)

Are you building your own version of Firefox ? If so, this is a known issue when building with the 10.14 SDK (see bug 1578917). Official Firefox builds don't have this issue since they build with the 10.11 SDK.

No, that screen shot was taken with official Firefox 70.0.1 build (not a self rolled Firefox binary), running on macOS Mojave 10.14.6 with macOS dark mode enabled.

Interesting, this doesn't happen on my side. Do you mind filing a new bug with information from about:support ? Thanks :)

Flags: needinfo?(firefox_bugs)

Well, where are your about:support information? I don't see them anywhere in this report.

Flags: needinfo?(firefox_bugs)

(In reply to cniff from comment #21)

Well, where are your about:support information? I don't see them anywhere in this report.

No one has reported your issue (the white text) so far, but the context menu having a light background in dark mode has been known for a while. I'm just trying to get your issue fixed quicker by figuring out where it's from, where about:support information can be handy. If you don't want to share it that's fine, but it'll be slower to figure things out for us. You can alternatively answer these questions: what macOS version are you using? do you have any special config enabled (webrender, etc.) ?

Flags: needinfo?(firefox_bugs)

Like I said, macOS Mojave 10.14.6, macOS dark mode enabled, official Firefox 70.0.1 build, no Firefox plugins, nothing special.

Actually its even worse than I thought. Even when I locally disable dark mode for Firefox, that is:
defaults write org.mozilla.firefox NSRequiresAquaSystemAppearance -bool Yes

then Firefox popups are back to normal, BUT the standard CSS text color is now (still) bright white. Consequence: many websites are unreadable unless I disable macOS dark mode for the entire system.

Having said that, I start to wonder whether that's an issue introduced by latest macOS update.

Which precise macOS version are you running on there?

Flags: needinfo?(firefox_bugs)
Attached image image.png

Hey cniff, I just updated my stable to 70.0.1 as well (mainly using Nightly) and also can't reproduce the issue. Will keep an eye out and update here in case this changes.

Since you can't reproduce it, what's your precise macOS build number? Mine is 18G1012 (which is a security update from Oct 31st 2019). You get the build number by clicking on the version number triple from the "About This Mac" dialog.

(In reply to cniff from comment #25)

Since you can't reproduce it, what's your precise macOS build number? Mine is 18G1012 (which is a security update from Oct 31st 2019). You get the build number by clicking on the version number triple from the "About This Mac" dialog.

It's the same as yours, "18G1012". Firefox Build ID 20191030021342

Ok, after checking all kinds of settings, both in Firefox as well as on macOS level, I got this issue resolved on my side with:

defaults delete -g NSRequiresAquaSystemAppearance

after rebooting Firefox finally behaves as expected with Dark Mode enabled on macOS.

Looks like this global defaults override was a left over on my installation from early Dark Mode times on macOS, where many apps still had plenty of issues running with Dark Mode. Sorry for the noise!

In case other macOS users come up encountering the same problem, you may consider checking for this global defaults key on Firefox startup and suggest users to remove it. Because if that combination of a) global defaults key and b) Dark Mode enabled exists, then Firefox is almost unusable (e.g. standard forms are white on white, standard CSS text color is inverted, etc.). But maybe I remain the only one ... ;-)

See Also: → 1534039

This should get addressed with bug 1623686.

Depends on: 1623686
See Also: 1534039
Depends on: 1644261
Blocks: 1623686
No longer depends on: 1623686
No longer depends on: mojave-sdk

(In reply to cniff from comment #27)

Ok, after checking all kinds of settings, both in Firefox as well as on macOS level, I got this issue resolved on my side with:

defaults delete -g NSRequiresAquaSystemAppearance

after rebooting Firefox finally behaves as expected with Dark Mode enabled on macOS.

Looks like this global defaults override was a left over on my installation from early Dark Mode times on macOS, where many apps still had plenty of issues running with Dark Mode. Sorry for the noise!

In case other macOS users come up encountering the same problem, you may consider checking for this global defaults key on Firefox startup and suggest users to remove it. Because if that combination of a) global defaults key and b) Dark Mode enabled exists, then Firefox is almost unusable (e.g. standard forms are white on white, standard CSS text color is inverted, etc.). But maybe I remain the only one ... ;-)

@cniff: I do not have this option set globally, nor for the firefox /mozilla products:

The domain/default pair of (mozilla.thunderbird, NSRequiresAquaSystemAppearance) does not exist
The domain/default pair of (kCFPreferencesAnyApplication, NSRequiresAquaSystemAppearance) does not exist

The context menus as well as open/save file dialogs are all white in Firefox and Thunderbird.
Any idea what to check?

(In reply to phlogi from comment #33)

@cniff: I do not have this option set globally, nor for the firefox /mozilla products:

The domain/default pair of (mozilla.thunderbird, NSRequiresAquaSystemAppearance) does not exist
The domain/default pair of (kCFPreferencesAnyApplication, NSRequiresAquaSystemAppearance) does not exist

The context menus as well as open/save file dialogs are all white in Firefox and Thunderbird.
Any idea what to check?

You got me wrong. I deleted the global NSRequiresAquaSystemAppearance entry, however I still need the local NSRequiresAquaSystemAppearance entry for the Firefox app:

defaults write org.mozilla.firefox NSRequiresAquaSystemAppearance -bool Yes
By setting NSRequiresAquaSystemAppearance Yes this actually means "this app does not work in Dark Mode" and macOS will show that specific app (i.e. Firefox in this case) in classic, bright mode.

The problem in my case with the global entry was, that for some reason, the entry used an incorrect data type (not Bool), and that in turn caused macOS to misbehave and sticking to dark mode, even though I had the local entry NSRequiresAquaSystemAppearance YES enabled for Firefox. Probably a macOS bug, because the local entry should still have precedence, no matter what you set as global entry.

Oh I see, thanks for the clarification. In the meantime I realized that other bugs are still pending and i we just have to wait for full darkmode support.

No longer blocks: 1623686
Depends on: 1623686
Whiteboard: [mac:ux][mac:mr1]
Whiteboard: [mac:ux][mac:mr1] → [mac:darkmode][mac:mr1]

According to this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1700679
Is that means that we will have to wait for Firefox 90 to get proper darkmode? Even when such a big interface update (Proton) coming with Firefox 89 ?

There is an uplift-request in comment 7 of bug 1700679, meaning it should/will be released with Fx89.

FF89.0b12 it's finally working!!

This was fixed in 89 by bug 1702351, bug 34572, bug 1702100 and bug 1704102.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Target Milestone: --- → 89 Branch
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: