Skip to content

fix(pages): clear document title on navigation to page with no title - #848

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
karthickeyan-dev:fix/846-client-visit-title
Nov 16, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
karthickeyan-dev:fix/846-client-visit-title

Conversation

@karthickeyan-dev

Copy link
Copy Markdown
Contributor

Closes #846.

Summary

When navigating client-side to a page without a title descriptor, applyClientHead() previously only updated document.title when head?.title !== undefined, leaving the prior page's title intact in the browser tab.

This change updates applyClientHead() to reset document.title to '' when no title is provided, matching full server page loads.

Verification

  • Unit tests added to packages/void/test/unit/pages-head-client.test.ts
  • Integration test added to packages/react/test/integration/react-pages-client.test.ts
  • vp fmt, vp lint, and vp run check all pass

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cpojer
cpojer merged commit fb0632a into voidzero-dev:main Nov 16, 2026
2 checks passed
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.

A client visit to a page with no title keeps the previous page's title

2 participants