-
Notifications
You must be signed in to change notification settings - Fork 396
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
Key listener issues in SPA #1363
Comments
Hi, any update with this one? Can we add a detroy method to clear docsearch event listener and destory the dom? |
Hello? |
(Hey there, sorry for the delay, added context here #1734) If you feel like contributing/providing the method, I'd be more than happy to review it! |
Sure, I will try to build a I just want to make sure if this sounds ok to you before starting contribution. |
Hi, any update about this one? I am still meeting users reporting this frequently. I opened PR years ago #1742, while I am not getting any review. |
Hi, this is Mr.Hope from VuePress Team.
Docsearch is not providing a method to destory itself or any way to customize (or remove) the search key listener in docs. So I wonder if there is a way, otherwise this will trigger error in SPA application, as each initialization will have side effects which can not be cleared.
Visit https://mister-hope.com/ and scroll down then click the first article. When you click
Ctrl + K
, you will find 2 docsearch popup is displayed.In VuePress, we are using SPA and provide "layout" options, different page may choose different layout. So when you switch to the first article, the whole page is rerendered because they have different layout, so docsearch reinitializes. But the previous key listener seems still exist, so keyboard actions seems not correct.
The text was updated successfully, but these errors were encountered: