Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't remove selection when hovering over a non-selectable DOM element (
#4577) * Don't remove selection when hovering over a non-selectable node Fixes #4545 To reproduce the buggy behavior: 1. Create a page that renders a Slate element with a `contentEditable: false` element in it. 2. Start selecting some text with the mouse. 3. During the drag, mouseover the `contentEditable: false` element. Expected behavior: After doing a drag-to-select with the mouse, from a valid anchor point on mousedown to a valid focus point on mouseup, the selection is set to those anchor and focus points. Actual behavior: your selection is removed as soon as your mouse hits the `contentEditable: false` element. This is because the current behavior clears the selection if it is momentarily not a valid Slate location. * Add changeset
- Loading branch information