1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00

Actually fix marks being cleared on selection events (#2181)

* Fix marks being cleared on selection events

* Fix mistake
This commit is contained in:
Nicolas Gaborit 2018-09-18 18:49:18 +02:00 committed by Ian Storm Taylor
parent 3e7116dce1
commit 4749cfc8b1

View File

@ -683,6 +683,11 @@ function AfterPlugin() {
let selection = document.createSelection(range)
selection = selection.setIsFocused(true)
// Preserve active marks from the current selection.
// They will be cleared by `change.select` if the selection actually moved.
selection = selection.set('marks', value.selection.marks)
change.select(selection)
}