Skip to content

Appearance theme switching title prompt bug #4004

Closed
@zxlfly

Description

@zxlfly

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

vitepressbug

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions