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:
committed by
Ian Storm Taylor
parent
dd87e3b26d
commit
8942598ef8
@@ -465,9 +465,7 @@ function AfterPlugin() {
|
|||||||
|
|
||||||
// Change the current value to have the leaf's text replaced.
|
// Change the current value to have the leaf's text replaced.
|
||||||
change
|
change
|
||||||
.select(entire)
|
.insertTextAtRange(entire, textContent, leaf.marks)
|
||||||
.delete()
|
|
||||||
.insertText(textContent, leaf.marks)
|
|
||||||
.select(corrected)
|
.select(corrected)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user