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:
parent
3e7116dce1
commit
4749cfc8b1
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user