gatsby-plugin-dark-mode icon indicating copy to clipboard operation
gatsby-plugin-dark-mode copied to clipboard

Theme toggle requires 2-3 clicks before changing theme

Open johndurso opened this issue 4 years ago • 5 comments

When my site (work in progress) first loads or you hard refresh, the toggle takes 2-3 clicks before changing the theme.

This was occurring out of the box.

https://friendly-jones-0d961e.netlify.app/

johndurso avatar Jan 07 '21 21:01 johndurso

Happens to me as well; the change from light to dark works as intended; toggling the theme from there on after also works as intended.

The problem is when I refresh after setting it to dark, it does load the dark theme and the checkbox does change state, but it takes 3 toggles for it to change to light.

luishendrix92 avatar Feb 12 '21 07:02 luishendrix92

I have the same problem, it starts with the dark theme, and to change it to light I have to click 3 times

jesielviana avatar Mar 03 '21 23:03 jesielviana

I also came across this issue and found that the solution is hidden in the latest commit (83409b53ecdcc5809d75bb11548eec4bfb8acebc). Since this is not part of the latest release, the changes have not made it yet to this plugin's pages in npm or Gatsby docs.

tiagofragoso avatar Mar 18 '21 00:03 tiagofragoso

The latest commit solved the issue👍 I had the same issue though it worked perfectly.

schabibi1 avatar Jun 04 '21 20:06 schabibi1

I also came across this issue and found that the solution is hidden in the latest commit (83409b5). Since this is not part of the latest release, the changes have not made it yet to this plugin's pages in npm or Gatsby docs.

This really helps, Thanks @tiagofragoso

zuhairnaqi avatar Oct 24 '22 19:10 zuhairnaqi