From bf28e49c343827423b9944b072b0db1f4eba70fb Mon Sep 17 00:00:00 2001 From: khannurien Date: Sun, 27 Sep 2026 11:29:44 +0000 Subject: [PATCH] =?UTF-8?q?v3:=20left=20and=20right=20step=20through=20emo?= =?UTF-8?q?ji=20results=20too=20=E2=80=94=20with=20a=20`:query`=20picker?= =?UTF-8?q?=20open,=20only=20up=20and=20down=20went=20to=20the=20grid;=20l?= =?UTF-8?q?eft=20and=20right=20moved=20the=20caret=20in=20the=20textarea,?= =?UTF-8?q?=20so=20the=20first=20press=20of=20either=20did=20nothing=20vis?= =?UTF-8?q?ible.=20Every=20arrow=20now=20steps=20into=20the=20grid,=20land?= =?UTF-8?q?ing=20one=20along=20from=20the=20automatic=20first=20match;=20E?= =?UTF-8?q?scape=20gives=20the=20caret=20back.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- src/components/TextEditor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/TextEditor.tsx b/src/components/TextEditor.tsx index 779e725d..7a9e6522 100644 --- a/src/components/TextEditor.tsx +++ b/src/components/TextEditor.tsx @@ -417,7 +417,10 @@ export const TextEditor = forwardRef( first.click(); return true; } - if ((e.key === "ArrowDown" || e.key === "ArrowUp") && plain) { + // Every arrow steps into the grid, left and right included: while a + // `:query` is open they pick among its results, not move the caret + // (Escape first to get the caret back). + if (e.key.startsWith("Arrow") && plain) { if (!firstEmoji()) return false; e.preventDefault(); arrowedRef.current = true;