You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Built with the latest VitePress version, using the default theme. After the build build is released, the style at the top of the page will shake every time you refresh it, affecting the experience.
Debugging revealed that the issue is caused by a mismatch between the initial styles in the generated HTML file and the styles after subsequent client-side rendering.
After client rendering:
Disable JavaScript in your browser:
Reproduction
I checked the source code and found that it’s likely caused by the watchPostEffect in VPNavBar.vue.
lzdyes
changed the title
The style of the top navigation bar jitters every time the page is refreshed.
The style of the header jitters every time the page is refreshed.
Nov 10, 2024
Describe the bug
Version: 1.5.0
Built with the latest VitePress version, using the default theme. After the build build is released, the style at the top of the page will shake every time you refresh it, affecting the experience.
Debugging revealed that the issue is caused by a mismatch between the initial styles in the generated HTML file and the styles after subsequent client-side rendering.
After client rendering:
Disable JavaScript in your browser:
Reproduction
I checked the source code and found that it’s likely caused by the
watchPostEffect
inVPNavBar.vue
.This causes the
has-sidebar
class to be missing from the header in the initially generated HTML.In contrast,
VPContent.vue
has normal initial rendering in the HTML.Expected behavior
You want the header style not to shake when you refresh
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: