1
0
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:
Ian Storm Taylor
2016-08-10 14:58:50 -07:00
parent 14c0a01583
commit 018390c8ee

View File

@@ -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
})