mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 23:12:52 +02:00
Fix drop contents insertion (#929)
Now drop fragments insert at correct location
This commit is contained in:
committed by
Ian Storm Taylor
parent
8a6024fe85
commit
43dbfbcb58
@@ -373,7 +373,7 @@ function Plugin(options = {}) {
|
|||||||
selection.endOffset < target.endOffset
|
selection.endOffset < target.endOffset
|
||||||
) {
|
) {
|
||||||
target = target.move(selection.startKey == selection.endKey
|
target = target.move(selection.startKey == selection.endKey
|
||||||
? 0 - selection.endOffset - selection.startOffset
|
? 0 - selection.endOffset + selection.startOffset
|
||||||
: 0 - selection.endOffset)
|
: 0 - selection.endOffset)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,7 +411,7 @@ function Plugin(options = {}) {
|
|||||||
selection.endOffset < target.endOffset
|
selection.endOffset < target.endOffset
|
||||||
) {
|
) {
|
||||||
target = target.move(selection.startKey == selection.endKey
|
target = target.move(selection.startKey == selection.endKey
|
||||||
? 0 - selection.endOffset - selection.startOffset
|
? 0 - selection.endOffset + selection.startOffset
|
||||||
: 0 - selection.endOffset)
|
: 0 - selection.endOffset)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user