Open Bug 1475520 Opened 2 years ago Updated 2 months ago

macOS dark mode should apply to context menus

Categories

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

enhancement

Tracking

()

Tracking Status
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fix-optional

People

(Reporter: ntim, Unassigned)

References

(Depends on 3 open bugs, Blocks 2 open bugs)

Details

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
Duplicate of this bug: 1493782
Whiteboard: [ntim-backlog]
Duplicate of this bug: 1516991
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
See Also: → 1569693
See Also: 1569693
Duplicate of this bug: 1573366

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
Duplicate of this bug: 1567815

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
Blocks: dark-mode
Depends on: 1644261
You need to log in before you can comment on or make changes to this bug.