mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 13:51:59 +02:00
fix: image disappears when the drag fails (#4631)
This commit is contained in:
parent
0b256b211e
commit
2ee2753d72
@ -941,7 +941,11 @@ export const Editable = (props: EditableProps) => {
|
||||
Transforms.select(editor, range)
|
||||
|
||||
if (state.isDraggingInternally) {
|
||||
if (draggedRange) {
|
||||
if (
|
||||
draggedRange &&
|
||||
!Range.equals(draggedRange, range) &&
|
||||
!Editor.void(editor, { at: range, voids: true })
|
||||
) {
|
||||
Transforms.delete(editor, {
|
||||
at: draggedRange,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user