1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 01:50:06 +02:00

When removing the node containing the cursor, always prefer placing the cursor in a sibling text node (#5923)

* Add tests describing the selection after the current node is removed

* Always prefer placing the cursor in a sibling text node after removal

* Add changeset
This commit is contained in:
Joe Anderson
2025-07-26 07:44:08 +01:00
committed by GitHub
parent 7657838d4e
commit ba33735a8c
12 changed files with 318 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
---
'slate': minor
---
- When removing a text node containing the cursor, always perfer placing the cursor in a sibling text node if one exists.
- Previously, the selection would enter a sibling inline in some circumstances, even when a sibling text node was available.
- The most noticeable effect of this change occurs when pressing backspace at the start of line N when the last non-empty node in line N-1 is an inline.
- Before, the cursor would be placed inside the inline.
- Now, the cursor is placed outside the inline.