add comment

This commit is contained in:
Philipp Kühn
2021-02-17 23:24:58 +01:00
parent 52b46ef1ff
commit 51772590cc

View File

@@ -67,6 +67,8 @@ export const focus: RawCommands['focus'] = (position = null) => ({
if (dispatch) {
tr.setSelection(selection)
// `tr.setSelection` resets the stored marks
// so well restore them if the selection is the same as before
if (isSameSelection && storedMarks) {
tr.setStoredMarks(storedMarks)
}