1
0
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:
mjadobson
2017-09-05 17:51:44 +01:00
committed by Ian Storm Taylor
parent 8a6024fe85
commit 43dbfbcb58

View File

@@ -373,7 +373,7 @@ function Plugin(options = {}) {
selection.endOffset < target.endOffset
) {
target = target.move(selection.startKey == selection.endKey
? 0 - selection.endOffset - selection.startOffset
? 0 - selection.endOffset + selection.startOffset
: 0 - selection.endOffset)
}
@@ -411,7 +411,7 @@ function Plugin(options = {}) {
selection.endOffset < target.endOffset
) {
target = target.move(selection.startKey == selection.endKey
? 0 - selection.endOffset - selection.startOffset
? 0 - selection.endOffset + selection.startOffset
: 0 - selection.endOffset)
}