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:
9
.changeset/stupid-ants-buy.md
Normal file
9
.changeset/stupid-ants-buy.md
Normal 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.
|
Reference in New Issue
Block a user