-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searchbox blinking on firtst usage #2513
Comments
@brc-dd Hey, Do I get it right that you don't qualify this as a bug? If not, why? In case you wasn't able to reproduce it, make sure to clear browser cache and force-reload the page (ctrl+f5). |
It is sort of expected behavior because that Algolia chunk is loaded dynamically on demand to reduce the initial load times. That element is then swapped by the docsearch one. That swap is appearing as the blink to you. But the blink is usually in sub seconds, and is very fast (<10ms) once that chunk is cached by the browser. We can try to figure out some way to avoid the element removal till the new one is mounted, but that might be bit of overengineering. |
Well, that doesn't happen on other sites, that use algolia, so it should be something vite or vitepress-specific. Users of my docs clearly identify this as a bug/glitch and I agree with them. Is there a way to make vite/vitepress preload the chunk, so that at least it doesn't disappear for that long on the initial load? |
Thank you! |
Describe the bug
When clicking the searchbox (or pressing ctrl+k) for the first time after the page loaded, it disappears for about 500ms.
vid.mp4
Reproduction
Expected behavior
The searchbox doesn't disappear.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: