mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-01 05:16:10 +01:00
Fix marks being cleared on selection events (#2158)
This commit is contained in:
parent
f75a274c0e
commit
ea950ac1af
@ -677,6 +677,10 @@ function AfterPlugin() {
|
||||
if (next) range = range.moveFocusTo(next.key, 0)
|
||||
}
|
||||
|
||||
// Preserve active marks from the current selection.
|
||||
// They will be cleared by `change.select` if the selection actually moved.
|
||||
range = range.set('marks', value.selection.marks)
|
||||
|
||||
let selection = document.createSelection(range)
|
||||
selection = selection.setIsFocused(true)
|
||||
change.select(selection)
|
||||
|
Loading…
x
Reference in New Issue
Block a user