Closed
Description
Describe the bug
Theme switching refresh page title display bug
Reproduction
VitePress official website has this issue.
After switching to dark mode, the title prompt is "Switch to light theme". After refreshing the page, the title prompt will become "Switch to dark theme", which is incorrect. It should be "Switch to light theme".
Expected behavior
Maintain the correct display
System Info
System:
OS: macOS 14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 528.32 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.6.0 - ~/.nvm/versions/node/v20.6.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v20.6.0/bin/yarn
npm: 9.8.1 - ~/.nvm/versions/node/v20.6.0/bin/npm
pnpm: 8.12.0 - ~/.nvm/versions/node/v20.6.0/bin/pnpm
Watchman: 4.9.0 - /usr/local/bin/watchman
Browsers:
Safari: 17.5
Additional context
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
No labels