1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 09:29:49 +02:00

Fix handling of editor.isSelectable in Editor.positions (#5929)

* Fix handling of `editor.isSelectable` in `Editor.positions`

* Clean-up
This commit is contained in:
Joe Anderson
2025-08-13 22:28:16 +01:00
committed by GitHub
parent cf10119ad8
commit fdaa9c8088
8 changed files with 140 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
---
'slate': patch
---
- Fix error when a non-selectable node has no next or previous node
- Do not return points from `Editor.positions` that are inside non-selectable nodes
- Previously, `editor.isSelectable` was handled incorrectly inside `Editor.positions`. When encountering a non-selectable node, it would immediately return the point before or after it (depending on `reverse`), but it would not skip returning points inside the non-selectable node if more than one point was consumed from `Editor.positions`.