Addon windows do not retheme automatically when toggling light/dark mode
When the system theme (light/dark) is switched globally, Firefox recognizes this and also switches its theme automatically (if configured appropriately). This should also retheme addons opened in the sidebar (Tab Stash or Sidebery for instance), and it does so under certain conditions, namely if either a) no sidebar was opened when starting Firefox and the addon sidebar window is opened directly, or b) the sidebar was opened with start of Firefox. Unfortunately, no retheming of the addon window occurs when some other Firefox sidebar (such as bookmarks or history) was opened after Firefox start and before system theme switch. In that case, the addon window (which is opened as the system theme is switched) does not retheme. This can be mitigated by either restarting Firefox or by opening a Firefox sidebar such as bookmarks or history, and switching back to the addon window.
So to reproduce this behaviour:
- Open Firefox and some sidebar addon directly (such as Tab Stash in my case, with Ctrl-Alt-S)
- Switch system theme globally (I do this with Night Theme Switcher in GNOME)
- Observe that Firefox correctly redraws the addon window
- Open bookmarks (Ctrl-B) or history (Ctrl-H)
- Reopen the addon window
- Switch system theme globally again
- Observe that Firefox does not correctly redraw the addon window
- Open bookmarks (Ctrl-B) or history (Ctrl-H) again
- Reopen the addon window
- Observe that Firefox redrew the addon window
This has already been reported to the addon developer, who stated that it might be a bug in Firefox, since his addon only tells Firefox which colors to use in which mode.
System details:
- OS Version: Linux 6.7.4-arch1-1
- Browser Version: Firefox 122.0.1
- Desktop environment: GNOME
Modified