ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Cursor jumps over paragraph when navigating with arrow up keys

Open itimie opened this issue 9 months ago • 1 comments

📝 Provide detailed reproduction steps (if any)

Create a table Add paragraph below table Move cursor to beginning of paragraph Press enter Press the up arrow key

✔️ Expected result

What is the expected result of the above steps? cursor should move into the newline on up arrow pressed from paragraph

❌ Actual result

cursor skips new line when up arrow pressed.

Image

Findings: CKEditor’s Widget plugin performs a double modifySelection in _handleSelectionChangeOnArrowKeyPress. When two positions are “touching” (only element boundaries between them), it modifies selection twice:

first move lands on the empty paragraph second move immediately skips past it to the widget because the empty paragraph and the text paragraph are adjacent (no text between them)

📃 Other details

  • Browser: …Edge, Chrome
  • OS: …Mac Sequoia 15.7.3
  • First affected CKEditor version: 47.2.0
  • Installed CKEditor plugins: …

itimie avatar Feb 19 '26 22:02 itimie

The issue is reproducible and occurs consistently across all browsers (Chrome, Firefox, Safari, and Edge).

kubaklatt avatar Feb 23 '26 11:02 kubaklatt