This commit is contained in:
Vanessa 2023-12-23 00:01:32 +08:00
parent e38ff69499
commit 50b76c7294

View file

@ -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;