mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 15:32:59 +02:00
fix to prevent being able to drag text into a void
This commit is contained in:
@@ -320,6 +320,9 @@ class Content extends React.Component {
|
|||||||
isFocused: true
|
isFocused: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// If the target is inside a void node, abort.
|
||||||
|
if (state.document.hasVoidParent(point.key)) return
|
||||||
|
|
||||||
// If the drag is internal, handle it now. And it the target is after the
|
// If the drag is internal, handle it now. And it the target is after the
|
||||||
// selection, it needs to account for the selection's content being deleted.
|
// selection, it needs to account for the selection's content being deleted.
|
||||||
if (this.tmp.isInternalDrag) {
|
if (this.tmp.isInternalDrag) {
|
||||||
|
Reference in New Issue
Block a user