1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-20 14:11:35 +02:00

Avoid changing selection when deleting old content (#1361)

This commit is contained in:
Blake Embrey
2017-10-31 22:25:29 -07:00
committed by Ian Storm Taylor
parent dd87e3b26d
commit 8942598ef8

View File

@@ -465,9 +465,7 @@ function AfterPlugin() {
// Change the current value to have the leaf's text replaced.
change
.select(entire)
.delete()
.insertText(textContent, leaf.marks)
.insertTextAtRange(entire, textContent, leaf.marks)
.select(corrected)
}