question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Tab supposed to be in light mode reverts to dark mode itself when switching between tabs

See original GitHub issue

Describe 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-tabed once to go to tabB and then control-shift-tabed 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)

image

TabB:

image

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:open
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Gustedcommented, Jan 6, 2021

@Gusted here’s a screenshot of the same query. It seems like this confirms your theory?

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.

2reactions
Gustedcommented, Dec 5, 2020

Hi @tddschn!

It’s weird how this happens, as Dark Reader only execute removing code on the site if it’s disabled to clean-up some things. It got me thinking that Chrome somehow got Dark Reader executed again, could you next time this happens do: Type in the console document.querySelectorAll('.darkreader'); and see what is being returned back?

Regards, Gusted

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task Manager Light/Dark Mode Bug - Microsoft Community
To do this, right click or long press on the desktop, select "Personalize", select "Colors", and then select either "Dark" or "Light" for...
Read more >
Why does yt change from dark morlde whenever I open a new ...
After you click on "new tab" you no longer in Youtube. You can change your browser in Dark mode or Dark theme. Turn...
Read more >
2022 Fix: Youtube Dark Mode not working - How to enable it
Your browser can't play this video. Learn more. Switch camera.
Read more >
Dark Mode - Human Interface Guidelines - Apple Developer
Dark Mode is a systemwide appearance setting that uses a dark color palette to ... which switches between light and dark appearances as...
Read more >
YouTube aware of Dark Mode issue on web version, fix ...
Opening YouTube on another tab or refreshing the page automatically resets the theme to Light Mode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found