mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 04:28:07 +01:00
This commit is contained in:
parent
f5ff8f74c2
commit
07aa1e077c
4 changed files with 14 additions and 8 deletions
|
|
@ -55,7 +55,7 @@ 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)) {
|
||||
if (!isAsset && matchHotKey(window.siyuan.config.keymap.general.newFile.custom, event) && config.method === 0) {
|
||||
newFileByName(app, searchInputElement.value);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ export const searchKeydown = (app: App, event: KeyboardEvent) => {
|
|||
return false;
|
||||
}
|
||||
if (currentList.getAttribute("data-type") === "search-new") {
|
||||
if (event.key === "Enter") {
|
||||
if (event.key === "Enter" && config.method === 0) {
|
||||
newFileByName(app, searchInputElement.value);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue