Closed Bug 2019989 Opened 4 months ago Closed 4 months ago

Custom Tabs' "Copy" context-menu has a purple background (and is unreadable with a light theme), if Firefox Nightly has a private tab in the foreground

Categories

(Firefox for Android :: Tabs, defect, P1)

All
Android
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox148 --- unaffected
firefox149 + verified
firefox150 --- verified

People

(Reporter: dholbert, Assigned: azinovyev)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

Steps to reproduce

  1. (optional but makes the bug more noticeable): Ensure that your device is using a "light" theme in System Settings; and in Firefox Nightly's Settings|Customize section, choose to follow the device theme.
  2. Set Firefox Nightly as your default browser.
  3. Open a private tab in Firefox Nightly (e.g. just tap the mask icon on the Firefox homepage)
  4. Switch to another app, e.g. Gmail, and tap a link to spawn a custom tab.
  5. Long-press the toolbar of the custom tab (where it shows the page title, back button, 3-dot menu, etc), to get a context menu with a "Copy" option.

Expected behavior

Regular-themed context menu.

Actual behavior

Context menu with purple background (private browsing themed) and black text, which is the wrong theme and also unreadable.

Device information

  • Firefox version: Nightly 150.0a1 2026-02-27
  • Android device model: Pixel 6a
  • Android OS version: 16

Any additional information?

This is related to (but distinct from) recently-fixed bug 2012254 and bug 2019177.

Attached image screenshot of bug

Regression range:
Newest known good nightly: 2026-01-18
Oldest known bad nightly: 2026-01-19

--> Regression from bug 2009823 (like bug 2012254).

Keywords: regression
Regressed by: 2009823

:azinovyev, since you are the author of the regressor, bug 2009823, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(azinovyev)

(Thanks for the quick action!)

Assignee: nobody → azinovyev
Flags: needinfo?(azinovyev)

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

Severity: -- → S2

This patch is intended to fix multiple bugs that were recently filed
which affect Custom Tab/PWA theming:

The change considers intents from external tabs (even though the
function is named isCustomTabIntent) to return the appropriate theme
back. However, there is nuance to this because multi-tasking between
apps can cause the global AppState.mode to change and therefore affect
the theme for the external tabs as well.

We invoke the onModeChange during the BrowsingModeManager init because
it is currently the source of truth from where the AppState.mode is
derived. What is missing from the manager is a notification to the
AppStore and also during updateMode. Equally important, is that due to
the connection between BrowsingModeManager and AppStore, calling
onModeChange would typically cause a recursive call between the two.
This is prevented because of the themeManager.isInitialized check
within the themeManagerProvider constructor today - this makes our
patch here, highly dependant on that change.

Co-authored-by: Andrey Zinovyev <azinovyev@mozilla.com>

Priority: -- → P1
Attachment #9549191 - Attachment is obsolete: true

Andrey and I have been looking over this bug and we came to a conclusion that there is a tight coupling between two systems (browsing mode manager and theme manager) that we can't remove with as easily as we expected because those two are unaware of Custom Tabs/PWAs and our fixes are quite brittle. We decided it's best to revert the original patches instead. 🥲

See the linked reverts of bug 2012254, bug 2006631, and bug 2009823.

See Also: → 2009823
See Also: → 2006631

Closing as fixed by backouts

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Attachment #9548750 - Attachment is obsolete: true

This issue does not reproduce anymore on Firefox for Android Nightly 150.0a1, and Beta 149.0b7 using a Samsung Galaxy Tab S9 Ultra (Android 16), Samsung Galaxy S9 (Android 8), and Realme C35 (Android 12).

Flags: needinfo?(jonalmeida942)
Flags: needinfo?(jonalmeida942)
Attachment #9552200 - Attachment is obsolete: true
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: