Vanessa 2024-07-03 22:30:25 +08:00
parent 80851be431
commit 4bffce930f
2 changed files with 1 additions and 4 deletions

View file

@ -955,8 +955,7 @@ ${genHintItemHTML(item)}
}
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
hideElements(["hint"], protyle);
event.preventDefault();
event.stopPropagation();
// 不需要 preventDefault https://github.com/siyuan-note/siyuan/issues/11846
return true;
}
return false;

View file

@ -553,8 +553,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (!event.altKey && !event.shiftKey &&
((event.key.indexOf("Arrow") > -1 && isNotCtrl(event)) || event.key === "Enter") &&
!protyle.hint.element.classList.contains("fn__none") && protyle.hint.select(event, protyle)) {
event.stopPropagation();
event.preventDefault();
return;
}
if (matchHotKey("⌘/", event)) {