Skip to content

fix: clear stale popovers on bfcache restore - #2567

Open
Shadorux wants to merge 1 commit into
jackyzha0:v5from
Shadorux:fix/popover-bfcache
Open

Shadorux wants to merge 1 commit into
jackyzha0:v5from
Shadorux:fix/popover-bfcache

Conversation

@Shadorux

Copy link
Copy Markdown

Closes #2537

Summary

  • Remove stale popover nodes when Safari restores a page from the back/forward cache.
  • Reset the active anchor on persisted pageshow so the restored page starts from a clean popover state.
  • Add regression coverage for persisted versus ordinary page-show behavior.

This keeps normal loads untouched and only performs the cleanup on a bfcache restore, matching the iOS/Safari reproduction where a synthetic hover popover survives the full navigation to a PDF and reappears blank on Back.

Validation

  • node --test quartz/components/scripts/popover.test.ts: 8/8 passed
  • npm test: 165/165 passed
  • npm run check: TypeScript + repo-wide Prettier passed
  • npx quartz build: passed, 56 files emitted
  • git diff --check: passed

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
quartz ✅ Ready (View Log) Visit Preview 4ef1814

This branch was successfully deployed

1 active deployment
Branch Preview — 4ef1814e Deployed Sep 23, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Popover remains stuck on screen after navigating back from a PDF/non-HTML link on touch devices (bfcache restore)

1 participant