fix(journal): close completions on Enter key press

This commit is contained in:
hypercross 2026-07-10 15:57:35 +08:00
parent 9790205468
commit 52563fd3ef
1 changed files with 2 additions and 2 deletions

View File

@ -330,9 +330,9 @@ export const JournalInput: Component = () => {
selectCompletion("up");
return;
}
if (e.key === "Enter" && comps[selectedIdx()].kind !== "no-results") {
if (e.key === "Enter") {
e.preventDefault();
acceptCompletion(comps[selectedIdx()]);
setShowCompletions(false);
return;
}
if (e.key === "Escape") {