You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using Nuxt3 with the colorMode module and fetching page-specific color modes from a Sanity backend. I want to force a specific color mode on certain pages. While the forced color mode works initially, clicking on the active nuxt-link for the current page causes the color mode to change unexpectedly.
Navigate to a page with a forced color mode. (light or dark)
Click on the active link of the current page.
What is Expected?
When navigating to a page with a forced color mode, the page should stay in the forced color mode, and clicking on the active nuxt-link should not change the color mode.
What is actually happening?
On pages with a forced color mode, clicking on the active link causes the color mode to change unexpectedly.
Thanks.
The text was updated successfully, but these errors were encountered:
This is quite weird, I suspect the issue comes from to the fact that you add the meta from a Nuxt middleware which is not called on the same route, but we use router.afterEach which is called anyway:
Hi,
I am using Nuxt3 with the colorMode module and fetching page-specific color modes from a Sanity backend. I want to force a specific color mode on certain pages. While the forced color mode works initially, clicking on the active nuxt-link for the current page causes the color mode to change unexpectedly.
Version
@nuxtjs/color-mode: 3.4.1
nuxt: 3.11.2
Reproduction Link
https://stackblitz.com/edit/github-qvp2nk-wgy2hy?file=middleware%2Fcolor-mode.global.ts
Steps to reproduce
What is Expected?
When navigating to a page with a forced color mode, the page should stay in the forced color mode, and clicking on the active nuxt-link should not change the color mode.
What is actually happening?
On pages with a forced color mode, clicking on the active link causes the color mode to change unexpectedly.
Thanks.
The text was updated successfully, but these errors were encountered: