This commit is contained in:
Vanessa 2023-03-14 23:16:06 +08:00
parent 8aa4dac91f
commit 3f5dc6432f
2 changed files with 5 additions and 4 deletions

View file

@ -46,7 +46,7 @@ export const toolbarSearchEvent = () => {
const initToolbarSearch = () => {
const inputElement = document.getElementById("toolbarSearch") as HTMLInputElement;
inputElement.focus();
inputElement.value = window.siyuan.storage[Constants.LOCAL_SEARCHEKEY];
inputElement.value = window.siyuan.storage[Constants.LOCAL_SEARCHEKEY] || "";
inputElement.addEventListener("compositionend", (event: InputEvent) => {
if (event && event.isComposing) {
return;