theme.getCurrent() returns wrong values for themes utilizing dark_theme manifest key
Categories
(WebExtensions :: Themes, defect)
Tracking
(Not tracked)
People
(Reporter: faridzelli, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0
Steps to reproduce:
- Enable the firefox-alpenglow theme.
- Examine the output of
theme.getCurrent().
Below is an extension for reference:
async function getCurrentThemeInfo() {
const themeInfo = await browser.theme.getCurrent();
console.log("Full theme info:", themeInfo);
if (themeInfo.colors) {
console.log(`Toolbar color: ${themeInfo.colors.toolbar}`);
console.log(`Icons color: ${themeInfo.colors.icons}`);
}
}
getCurrentThemeInfo();
Actual results:
theme.getCurrent().colors.iconsreturnsnullfor firefox-alpenglowtheme.getCurrent().colors.iconsreturns correct values for firefox-compact-light and firefox-compact-dark
Expected results:
Alpenglow’s manifest defines both a "theme" and a "dark_theme". When the dark theme is active, theme.getCurrent().colors.icons should return the value defined in the "dark_theme" object of the manifest, rather than null. The "dark_theme" key is poorly documented and has not been referenced in the MDN docs despite its use in a default theme.
Comment 1•10 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Reporter | ||
Comment 2•10 months ago
|
||
(In reply to Farid Zellipour from comment #0)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0
Steps to reproduce:
- Enable the firefox-alpenglow theme.
Important note: System theme must be set to dark, otherwise the light theme is used and returned values will be correct.
Updated•10 months ago
|
| Reporter | ||
Comment 3•10 months ago
|
||
Duplicate of:
https://bugzilla.mozilla.org/show_bug.cgi?id=1435216
Description
•