mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 04:04:06 +02:00
fix cursor mark preservation logic
This commit is contained in:
@@ -198,8 +198,8 @@ class Transform extends new Record(DEFAULT_PROPERTIES) {
|
||||
// Apply each of the steps in the transform, arriving at a new state.
|
||||
state = steps.reduce((memo, step) => this.applyStep(memo, step), state)
|
||||
|
||||
// If the selection has changed, clear any existing cursor marks.
|
||||
if (state.selection != selection) {
|
||||
// If there are cursor marks and they haven't changed, remove them.
|
||||
if (state.cursorMarks && state.cursorMarks == cursorMarks) {
|
||||
state = state.merge({
|
||||
cursorMarks: null
|
||||
})
|
||||
|
Reference in New Issue
Block a user