mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
Close search dialog on input submission in SearchBar.
This commit is contained in:
@@ -382,6 +382,15 @@ function SearchBar() {
|
||||
className={"w-full"}
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
if (search.length === 0) {
|
||||
return;
|
||||
}
|
||||
const dialog = document.getElementById(
|
||||
"search_dialog",
|
||||
) as HTMLDialogElement;
|
||||
if (dialog) {
|
||||
dialog.close();
|
||||
}
|
||||
doSearch();
|
||||
}}
|
||||
>
|
||||
|
Reference in New Issue
Block a user