[Bug] Dark Reader broken on Firefox Nightly (not able to transition between CSS)
See original GitHub issueBug Report
Website Address
Bug Description
Firefox Nightly 101.0a
When page initially loads, Dark Reader fails to properly select and transition light css to dark css.
Steps To Reproduce
Dark Reader configs:
{ "enabled": true, "fetchNews": false, "theme": { "mode": 1, "brightness": 100, "contrast": 100, "grayscale": 0, "sepia": 0, "useFont": false, "fontFamily": "Segoe UI", "textStroke": 0, "engine": "dynamicTheme", "stylesheet": "", "darkSchemeBackgroundColor": "#272727", "darkSchemeTextColor": "#e8e6e3", "lightSchemeBackgroundColor": "#dcdad7", "lightSchemeTextColor": "#181a1b", "scrollbarColor": "auto", "selectionColor": "auto", "styleSystemControls": false, "lightColorScheme": "Default", "darkColorScheme": "Default", "immediateModify": false }, "presets": [], "customThemes": [], "siteList": [ "www.reddit.com", "www.samsungebiz.com" ], "siteListEnabled": [ "imgur.com", "www.epicgames.com", "www.base64decode.org", ], "applyToListedOnly": false, "changeBrowserTheme": false, "syncSettings": true, "syncSitesFixes": true, "automation": "", "automationBehaviour": "OnOff", "time": { "activation": "18:00", "deactivation": "9:00" }, "location": { "latitude": null, "longitude": null }, "previewNewDesign": true, "enableForPDF": true, "enableForProtectedPages": false, "enableContextMenus": false, "detectDarkTheme": false, "notifyOfNews": false, "readNews": [ "v4-9-16", "v4-9", "attention", "dr-5-announcement", "2m-users", "automation", "product-hunt-golden-kitty-2018", "time-settings", "safari", "500k-users", "stylish", "product-hunt", "custom-site-settings", "thanks-for-contribution", "dynamic-theme" ] }
Sites were chosen at random. All sites are like this.
Go to Bloomberg or Fluent Reader and let Dark Reader load (without altering Dark Reader configs)
Observe site
Expected Behavior
Actual Behavior
If I manually turn off Dark Reader and turn it on again, it loads properly. (Expected Behavior)
Screenshots
Attached above
System Information
- OS: Windows 10
- Browser: Firefox Nightly 101
- Dark Reader Version: 4.9.48
Additional Context
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:9 (3 by maintainers)
Top GitHub Comments
Dark Reader v4.9.50(which includes the fix) has been released
Yeah this is an issue with adopted stylesheets not working from extensions on Firefox (it’s tricky due to our security wrappers), and is being tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=1766909.
As a workaround on darkreader’s side,
try
/ catching in handleAdoptedStyleSheets would do.That workaround would be appreciated, though the patch in that bug should also address the issue.