Skip to content

fix(dev): preserve hash target after image load - #5585

Open
azizu06 wants to merge 1 commit into
vuejs:mainfrom
azizu06:fm/vitepress-3428
Open

azizu06 wants to merge 1 commit into
vuejs:mainfrom
azizu06:fm/vitepress-3428

Conversation

@azizu06

@azizu06 azizu06 commented Nov 22, 2026

Copy link
Copy Markdown

Description

On the dev server, reloading a hash link near the bottom of a page can leave the heading below the viewport once an image above it loads.

Keep the initial scroll to the heading, then correct the position when a pending image shifts it and the reader is still at the same scroll position.

Linked Issues

Fixes #3428

Additional Context

The Chromium regression holds the image response until the page reaches its initial scroll position. On upstream main, releasing the image moved the heading down 700 px.
The regression passes in dev and build. Formatting, package checks, type checks, and the repository test suites passed locally.


Tip

The author can publish a preview release by commenting /publish after creating the PR.

@netlify

netlify Bot commented Nov 22, 2026

Copy link
Copy Markdown

👷 Deploy request for vitepress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f1cc53f

This branch has not been deployed

No deployments
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.

The anchor point of markdown file is incorrect after using vue component

1 participant