Open cmmartin opened 2 years ago
I have this question too
In our app we have a normalization rule to always have an empty zero width text element after the void (and semi-related a block element at the end to make it easier to select around anything).
In our app we have a normalization rule to always have an empty zero width text element after the void (and semi-related a block element at the end to make it easier to select around anything).
@dylans since slate isn't controlled, how did you manage to do that?
Description When you have a text node directly after a void node and you select the (empty) text node and press delete, the text node and the void node are both deleted. Only the text node should be deleted and the selection should move to the void node.
Recording
Sandbox This can be reproduced in any of the examples that contain a void node. For example, https://www.slatejs.org/examples/images and https://www.slatejs.org/examples/editable-voids
Steps To reproduce the behavior:
Expectation Only the selected paragraph should be removed and the selection should move to the void node above it
Environment
Context The main issue here is it means a void node can't be the last node in a document. By deleting the nodes after it, you end up deleting the void node itself