Docs: Move the caret between blocks with Arrow Up/Down
In Notion the arrow keys move freely through the page, crossing block boundaries (https://www.notion.com/help/keyboard-shortcuts). Each of our blocks is its own contentEditable (components/docs/DocsBlockEditor.tsx), and handleKeyDown in components/docs/DocsEditor.tsx only handles ArrowUp/Down inside the slash menu, so the caret gets stuck at the first or last line of a block and the user must reach for the mouse. This hurts every editing session, especially on long notes. First scope: when the caret is on the first visual line (ArrowUp) or last visual line (ArrowDown), or at offset 0 / end for ArrowLeft/Right, focus the neighbouring block and place the caret at the matching x position (lib/docs-caret.ts already has offset helpers); also make Delete at the end of a block merge the next one. Priority: high. Effort: S. Compared with Notion.
Comments 0
No comments yet.
Sign in to comment