Slate selection doesn't update when dragging browser selection focus into contentEditable={false}
element
#5714
Labels
contentEditable={false}
element
#5714
Description
When I drag my browser selection focus into a
contentEditable={false}
DOM element that's being rendered by a non-void Slate element renderer, Slate's selection doesn't get updated. At times, this causes non-highlighted text to be deleted when pressing Backspace (first recording below). At other times, this causes a Backspace press to crash the page (second recording below).Recording
Sandbox
https://www.slatejs.org/examples/check-lists
Expectation
In the above recordings, that only the visually highlighted text would be deleted on Backspace and that the page would not crash.
Environment
main
(confirmed locally with 7e77a93)Context
I'm in the process of working on a fix, since this bug affects my project (we have a block type that renders a larger
contentEditable={false}
element above its text content, so it's a bit easier to trigger). I'll submit a PR once that's ready; just wanted to give y'all a heads-up here first.The text was updated successfully, but these errors were encountered: