markdown-editor icon indicating copy to clipboard operation
markdown-editor copied to clipboard

fix: keyboard navigation in nested block containers

Open makhnatkin opened this issue 4 months ago • 2 comments

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.

makhnatkin avatar Oct 10 '25 10:10 makhnatkin

Preview is ready.

gravity-ui-bot avatar Oct 10 '25 11:10 gravity-ui-bot

Visual Tests Report is ready.

gravity-ui-bot avatar Oct 10 '25 11:10 gravity-ui-bot