This commit is contained in:
Vanessa 2023-04-03 18:30:58 +08:00 committed by Liang Ding
parent e6304e1d24
commit c0b30d4543
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D

View File

@ -1080,7 +1080,8 @@ const editKeydown = (event: KeyboardEvent) => {
return true;
}
const target = event.target as HTMLElement;
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" ||
hasClosestByAttribute(target, "contenteditable", null)) {
return false;
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.refresh.custom, event)) {
@ -1216,7 +1217,9 @@ const fileTreeKeydown = (event: KeyboardEvent) => {
return true;
}
const target = event.target as HTMLElement;
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" ||
hasClosestByAttribute(target, "contenteditable", null) ||
hasClosestByClassName(target, "protyle", true)) {
return false;
}
if (bindMenuKeydown(event)) {