markdown-editor
markdown-editor copied to clipboard
fix: keyboard navigation in nested block containers
Problem
Cursor gets stuck when navigating with Arrow Up/Down keys in nested sections because the editor tries to place gap cursor between adjacent block containers, which is invalid per schema.
Fix
Added validation in findFakeParaPosClosestToPos() to skip invalid positions between block containers (content: 'block+') and search for valid positions at different depths. Special handling for Arrow Down prevents cursor from getting stuck at end-of-parent positions when nodeAfter = null.
Preview is ready.
Visual Tests Report is ready.