New Window (Ctrl+N) from a Private Browsing Window creates a window with dark-mode theme regardless of settings
Categories
(Firefox :: Theme, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox161 | --- | wontfix |
| firefox162 | --- | verified |
| firefox163 | --- | verified |
People
(Reporter: danweiss, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 2 external files)
|
18.13 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:161.0) Gecko/20100101 Firefox/161.0
Steps to reproduce
Make sure Firefox's theme is not set to Dark Mode. (Settings -> Appearance -> Browser Theme)
Open a private browsing window (Ctrl+Shift+P)
While the private browsing window is active, open a New window (Ctrl+N)
Actual results
Firefox opened a window with the Dark Mode theme applied, even when the main window does not use that theme. For people who do not use Dark Mode as their main theme, this can appear confusingly similar to a private browsing window, and can mislead people.
Problem also seen in Firefox Nightly as well.
Expected results
Firefox should have opened a window matching the default theme.
Comment 1•6 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Theme' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•6 days ago
|
||
Claude investigation
confirmed as b731bc2cd303, Bug 2087393. I checked the diff myself:
BrowsingContext::SetOpener now copies the color scheme from the opener's document (GetOverriddenOrEmbedderColorScheme()), and a dark private window's scheme is "dark".
The patch removed the line in LightweightThemeConsumer._update that used to reset the new window's override to "none". Nothing else writes it now, so the inherited "dark" sticks.
Ctrl+N passes the private window as the opener (OpenBrowserWindow, then options.openerWindow ??= window). It should reproduce with the default System theme on a light OS.
Fix direction: reset prefersColorSchemeOverride = "none" for top-level windows in _update.
Comment 3•6 days ago
|
||
:emilio, since you are the author of the regressor, bug 2087393, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•5 days ago
|
| Assignee | ||
Comment 4•5 days ago
|
||
Meh, I forgot about this edge case.
Updated•5 days ago
|
Updated•2 days ago
|
Comment 7•2 days ago
|
||
| bugherder | ||
Comment 8•2 days ago
|
||
The patch landed in nightly and beta is affected.
:emilio, please make an uplift decision for beta:
- For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set
status-firefox162towontfixif the fix can wait for the next release.
The bugbug regressor model rates the patch as high risk: about 15% of the patches with this rating cause a regression. Unless the fix is important for this release, consider letting it ride the trains.
Uplift requests can be submitted from Lando: D346958.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
Comment 9•2 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: regression fix
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: comment 0
- Risk associated with taking this patch: low
- Explanation of risk level: one-liner
- String changes made/needed?: none
- Is Android affected?: no
| Assignee | ||
Comment 10•2 days ago
|
||
Meh, I forgot about this edge case.
Original Revision: https://phabricator.services.mozilla.com/D346958
| Assignee | ||
Updated•2 days ago
|
Updated•2 days ago
|
Updated•2 days ago
|
Comment 11•2 days ago
|
||
| uplift | ||
Updated•6 hours ago
|
Comment 12•2 hours ago
|
||
Reproduced the initial issue on Firefox 161.0.1 on Windows 11 - a new window opened from a private window uses the Dark theme, even when the initial normal window uses the Light theme.
Verified as fixed using Firefox 162 and the latest Nightly 163.0a1 on Windows 11, macOS 26 and Ubuntu 24.04 - the new window opened from a private window now matches the theme of the initial normal window.
Description
•