From e726675d777d14415f937a3110d91341a6e6657f Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Fri, 19 Jun 2026 18:53:55 +0200 Subject: [PATCH] fix(editor): don't open the completion popup on deletion Backspace/delete/cut emit an input event too, which reopened the popup mid-edit. Skip the refresh on any delete inputType. --- src/components/PlanEditor.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/PlanEditor.vue b/src/components/PlanEditor.vue index 66c724a..613580e 100644 --- a/src/components/PlanEditor.vue +++ b/src/components/PlanEditor.vue @@ -147,6 +147,12 @@ function escapeHtml(s: string): string { function onInput(e: Event) { emit("update:modelValue", (e.target as HTMLTextAreaElement).value) + // Deleting text (backspace, forward-delete, cut) shouldn't summon the popup — + // the author is removing, not asking for suggestions. Close it and stop. + if ((e as InputEvent).inputType?.startsWith("delete")) { + completion.value = null + return + } refresh() }