Przeglądaj źródła

:art: fix https://github.com/siyuan-note/siyuan/issues/9950

Vanessa 1 rok temu
rodzic
commit
50b76c7294
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      app/src/boot/globalEvent/searchKeydown.ts

+ 4 - 2
app/src/boot/globalEvent/searchKeydown.ts

@@ -55,8 +55,10 @@ export const searchKeydown = (app: App, event: KeyboardEvent) => {
     const isAsset = !assetsElement.classList.contains("fn__none");
     const listElement = isAsset ? assetsElement.querySelector("#searchAssetList") : element.querySelector("#searchList");
     const searchInputElement = element.querySelector("#searchInput") as HTMLInputElement;
-    if (!isAsset && matchHotKey(window.siyuan.config.keymap.general.newFile.custom, event) && config.method === 0) {
-        newFileByName(app, searchInputElement.value);
+    if (!isAsset && matchHotKey(window.siyuan.config.keymap.general.newFile.custom, event)) {
+        if (config.method === 0) {
+            newFileByName(app, searchInputElement.value);
+        }
         return true;
     }
     const targetId = (event.target as HTMLElement).id;