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;