a tool for shared writing and social publishing

Fix arrow key navigation with footnotes and stored marks (#300) master

* clear cursor marks when arrow keys hit block boundary inside a mark When the cursor sits at the start or end of a text block and is inside a mark (e.g. bold), the first ArrowLeft/ArrowRight press now clears the stored marks instead of navigating to the adjacent block. A second press moves between blocks as before. This lets users escape an inclusive mark without first typing a character. * step the cursor past footnotes when arrow keys are pressed Footnotes render as empty <span> elements (with the number coming from a CSS ::after pseudo-element), so browser-native arrow navigation can skip past the span without stopping on either side. Detect when $from.nodeBefore/nodeAfter is a footnote and explicitly move the selection across it. * extract skipFootnote and clearStoredMarks helpers ArrowLeft and ArrowRight had two copies each of the footnote-skip and stored-marks-clearing logic. Pull them into small helpers and use state.selection.empty instead of allocating a Slice via content().size. --------- Co-authored-by: Claude <noreply@anthropic.com>


+38 -4
1 changed file