-
Notifications
You must be signed in to change notification settings - Fork 79
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
Search text not removed - when click the result which already an active url #13
Comments
Thanks for reporting @Nilanth, I will take a look 👍 |
This issue happens only when you select a result which is already an active URL.. |
No, it occurs on all pages! |
When moving from landing page to documentation the search is cleared. However @Nilanth is right that once in the documentation, the search is never cleared. |
Thats the old documentation link.. try this https://lelouch77.github.io/docusaurus-lunr-search-multilang @Nilanth @mattcorner |
Its a bit inconsistent. Sometimes it does remove clear the search, but a lot of the time it doesn't. Here it is not clearing on the new demo @lelouch77 This only occurs for doc to doc navigation |
On const initAlgolia = (searchDocs, searchIndex, DocSearch) => {
new DocSearch({
searchDocs,
searchIndex,
inputSelector: "#search_input_react",
handleSelected: (_input, _event, suggestion) => {
const url = baseUrl + suggestion.url;
const a = document.createElement("a");
a.href = url;
_input.setVal(''); // clear value
_event.target.blur(); // remove focus
history.push(url);
}
});
}; So the input is cleared and its focus is removed when a result is clicked. Hope it helps! |
fixed in new version |
Hi,
The search text in the search bar is not removed once we click the search result.
The text was updated successfully, but these errors were encountered: