Closed Bug 1901073 Opened 2 years ago Closed 2 years ago

Firefox on Windows with mismatched system theme (dark mode OS, light mode FF) loads a new tab with wrong colors temporarily

Categories

(Firefox :: Theme, defect, P3)

Firefox 126
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mkshadoff, Unassigned)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0

Steps to reproduce:

  1. Start on dark mode (also have system in dark mode)
  2. Switch to light mode

Actual results:

When loading Firefox will sometimes briefly appear in dark mode, and then transition to light mode

Expected results:

Firefox should load with the correct theme intially

Component: Untriaged → Theme

Also my OS, windows, is in dark mode, in case this is relevant

Same sort of thing happens on the mobile version of Firefox on Android, version 126.0.1.
I think this is caused by the system theme fighting with Firefox in some way as setting both the system theme and firefox to light mode fixes the issue on android.

However, setting only Firefox to light mode causes loading screens to occasionally use the light theme.

Attached video Flash warning bug.mp4

Here is the bug happening on mobile.

(In reply to mkshadoff from comment #2)

Same sort of thing happens on the mobile version of Firefox on Android, version 126.0.1.
I think this is caused by the system theme fighting with Firefox in some way as setting both the system theme and firefox to light mode fixes the issue on android.

However, setting only Firefox to light mode causes loading screens to occasionally use the light theme.

I thought this only happened when device is in dark theme, but I changed it to light theme and it still happens occasionally

The severity field is not set for this bug.
:sfoster, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sfoster)

:emilio, does this ring any bells?

Flags: needinfo?(sfoster) → needinfo?(emilio)

We should split this into two, the android bit is by necessity different to Windows.

Can you post a screencast on Windows? I can't quite see it on Nightly, but it might depend on the machine's speed or I might be doing something wrong.

Maybe we're calling UpdateDarkModeToolbar too early? Or maybe you're seeing the XUL pre-skeleton UI and we don't store the right preference there (something like here or so?

Moving to windows for now. I'll make a clone for Android.

Component: Theme → Widget: Win32
Flags: needinfo?(emilio) → needinfo?(mkshadoff)
Product: Firefox → Core
Summary: Firefox Loads as wrong theme → Firefox on Windows with mismatched system theme (dark mode OS, light mode FF) loads with wrong colors
See Also: → 1904462

Hello!
I am not able to reproduce this issue on the 127.0.1 version of Firefox or latest versions.
Are you still able to reproduce this on your end?
Can you provide a video in which you also have the OS theme settings available?
Thank you!

Severity: -- → S3
Priority: -- → P3

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

We should split this into two, the android bit is by necessity different to Windows.

Can you post a screencast on Windows? I can't quite see it on Nightly, but it might depend on the machine's speed or I might be doing something wrong.

Maybe we're calling UpdateDarkModeToolbar too early? Or maybe you're seeing the XUL pre-skeleton UI and we don't store the right preference there (something like here or so?

Moving to windows for now. I'll make a clone for Android.

I can't reproduce it consistently enough to get a screencast of the bug on windows, it only happens around 1/30 times. All you have to do is open firefox to cause the bug, but the skeleton loads in dark for about 0.5 seconds and then switches to light mode

Flags: needinfo?(mkshadoff)

(In reply to Virgil Sangerean from comment #8)

Hello!
I am not able to reproduce this issue on the 127.0.1 version of Firefox or latest versions.
Are you still able to reproduce this on your end?
Can you provide a video in which you also have the OS theme settings available?
Thank you!

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

We should split this into two, the android bit is by necessity different to Windows.

Can you post a screencast on Windows? I can't quite see it on Nightly, but it might depend on the machine's speed or I might be doing something wrong.

Maybe we're calling UpdateDarkModeToolbar too early? Or maybe you're seeing the XUL pre-skeleton UI and we don't store the right preference there (something like here or so?

Moving to windows for now. I'll make a clone for Android.

My computer is also quite fast, and only a few years old so it may be a loading speed issue

For clarity: has this happened —

  • when opening a new Firefox tab?
  • when opening a new Firefox window?
  • only when starting a new instance of Firefox?

Separately: can you reproduce this on the latest Firefox Nightly? (There have been some recent changes to window-creation — and specifically the initial skeleton UI's drawing — which shouldn't affect this, but might anyway.)

Flags: needinfo?(mkshadoff)

(In reply to Ray Kraesig [:rkraesig] from comment #12)

For clarity: has this happened —

  • when opening a new Firefox tab?
  • when opening a new Firefox window?
  • only when starting a new instance of Firefox?

Separately: can you reproduce this on the latest Firefox Nightly? (There have been some recent changes to window-creation — and specifically the initial skeleton UI's drawing — which shouldn't affect this, but might anyway.)

Still happens on nightly, only when creating new tab. It happens about half the time

Used to happen on main firefox whenever opening app, that seems to be fixed.

Flags: needinfo?(mkshadoff)

(In reply to mkshadoff from comment #13)

Still happens on nightly, only when creating new tab. It happens about half the time

This probably isn't a Widget: Win32 bug, then — the window's already established, and I'm pretty sure we're just delegating to cross-platform drawing routines at this point. I'm not sure who would be responsible, though. — possibly someone in DOM. :emilio, do you have a clearer idea?

Used to happen on main firefox whenever opening app, that seems to be fixed.

This, on the other hand, was a Widget: Win32 bug (specifically bug 1824053). (EDIT: Although the fix is only in Fx 129+, so it hasn't propagated to Release yet.)

Flags: needinfo?(emilio)

Still happens on nightly, only when creating new tab. It happens about half the time

Would you be able to screencast that? I can't seem to repro that either. Are you using a custom newtab page or something?

Moving to theme for now, but hard to know where it should go without knowing more details... Also that shouldn't be windows-specific...

Component: Widget: Win32 → Theme
Flags: needinfo?(emilio) → needinfo?(mkshadoff)
Product: Core → Firefox
Summary: Firefox on Windows with mismatched system theme (dark mode OS, light mode FF) loads with wrong colors → Firefox on Windows with mismatched system theme (dark mode OS, light mode FF) loads a new tab with wrong colors temporarily

Here is the bug happening on nightly

Flags: needinfo?(mkshadoff)

(In reply to mkshadoff from comment #16)

Created attachment 9412058 [details]
Nightly flash warning.mp4

Here is the bug happening on nightly

Also I don't think I'm using a custom new page

Ok that's on Android. It seems like the desktop part of this is fixed, let's track the android bits in bug 1904462.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: