[BUG] Tab supposed to be in light mode reverts to dark mode itself when switching between tabs
See original GitHub issueDescribe the bug
A clear and concise description of what the bug is.
I had 2 tabs tabA
and tabB
open, and they were on different domains. In tabA
, I disabled dark mode for the current domain by pressing opt-shift-A, so it appeared in the original color. Then I swtiched to tabB
, which was still in dark mode, then I switched back to tabA
, it appeared in dark mode too! However, the domain for tabA
is still among the list that dark mode did not apply. To disable dark mode for tabA
, I had to press opt-shift-A twice or clicking Toggle current website
button twice.
Steps to reproduce
The bug appears randomly bug quite frequently.
The last time I noticed it, I had a dozens of tabs open in Google Chrome 87 on macOS Big Sur (AFAIK, this bug affects lower version of macOS and Chrome on GNOME too).
TabA
was https://www.pmalerts.com/
and tabB
was https://news.ycombinator.com/item?id=25161117
. The two tabs are the 4th and 5th tabs counting from the right of the tab bar. I disabled dark mode on tabA
, and did not change settings for tabB
. I was in tabA
, and then control-tab
ed once to go to tabB
and then control-shift-tab
ed back to the tab, and it appeared in dark mode even if the extension showed that dark mode was disabled. And I had to press opt-shift-A twice or clicking Toggle current website
button twice to actually disable dark mode for this site.
Expected behavior
TabA
is supposed to always be in light mode after I set it to do so.
Actual behavior
See Steps to reproduce
above.
Like I said, the bug appears randomly bug quite frequently.
Screenshots
TabA (set to light mode but appears in dark mode)
TabB:
System Information:
- OS: macOS Big Sur 11.0.1 20B29 x86_64
- Browser: Google Chrome 87.0.4280.67
- Dark Reader version: 4.9.24
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14 (6 by maintainers)
Top GitHub Comments
Nope, this lets me more think that Google Chrome has and edge case with some of our internals. Time to boot up old boy Google Chrome and see if I can get an consistent reproduce-able case.
Hi @tddschn!
It’s weird how this happens, as Dark Reader only execute
removing
code on the site if it’s disabled toclean-up
some things. It got me thinking that Chrome somehow got Dark Readerexecuted
again, could you next time this happens do: Type in the consoledocument.querySelectorAll('.darkreader');
and see what is being returned back?Regards, Gusted