vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.01k stars 2.1k forks source link

Firefox: after clicking sidebar and nav links, cursor sticks on `default` #4108

Open olets opened 2 months ago

olets commented 2 months ago

Describe the bug

There's a Firefox bug in navigating between pages.

After clicking an internal sidebar link, the cursor is default until it hovers over an unlinked element, even when it should be pointer.

Same for the nav.

I wouldn't be surprised if this is a broader bug with cross-page navigation in Firefox, where after clicking a link to another page the cursor sticks on default.

Screen recordings https://github.com/user-attachments/assets/525b8022-ae0b-4fdd-91a6-253542f9f3db https://github.com/user-attachments/assets/3f95e9e8-6ebd-44e1-9437-01a9ffa67d85

Reproduction

  1. Visit https://vitepress.dev/guide/getting-started in desktop Firefox
  2. Click a sidebar link
  3. 🐞 Confirm that the cursor is default not pointer
  4. Move the cursor to adjacent sidebar links
  5. 🐞 Confirm that the cursor stays default not pointer
  6. edit: added Repeat for internal nav links, 🐞 confirm identical bugs

Expected behavior

Links get cursor: pointer.

System Info

bunx envinfo --system --npmPackages vitepress --binaries --browsers

  System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 275.55 MB / 16.00 GB
    Shell: 5.9 - /opt/homebrew/bin/zsh
  Binaries:
    Node: 18.12.0 - ~/.asdf/installs/nodejs/18.12.0/bin/node
    npm: 8.19.2 - ~/.asdf/installs/nodejs/18.12.0/bin/npm
    bun: 1.1.21 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 127.1.68.134
    Chrome: 127.0.6533.89
    Edge: 127.0.2651.86
    Safari: 17.5

Additional context

There's a simple hack to trigger the pointer cursor for the adjacent links: add a pixel of margin between sidebar and nav links. That reduces the user-facing bug to the much smaller "after clicking a sidebar or nav link in Firefox, the cursor is stuck on default until it is moved off the clicked link. Happy to PR that as a temporary workaround.

Validations