Open
Bug 1682168
Opened 4 years ago
Updated 4 years ago
matchMedia event listener won't fire on theme change
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: juraj.masiar, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Steps to reproduce:
- make sure your Thunderbird is using Default theme (the one that changes to dark/light based on the OS setting)
- load extension
- click "Inspect" button to see the background script
- open Windows "Color settings" and change "Choose your color" to Custom and "Choose your default app mode" to Dark / Light (switch back and forth)
Actual results:
Theme correctly changes in Thunderbird.
If you execute window.matchMedia('(prefers-color-scheme: dark)').matches
you get the correct True / False value.
BUT the event won't fire when the change happens!
Expected results:
The event should fire when OS changes the theme.
Note that the event will fire if you manually change your Thunderbird theme.
Updated•4 years ago
|
Component: Untriaged → Add-Ons: Extensions API
Comment 1•4 years ago
|
||
I can confirm, it does not work in a background page in Thunderbird, while it does work in a background page in Firefox.
It works in normal WebExtension pages for both.
You need to log in
before you can comment on or make changes to this bug.
Description
•