add comment
This commit is contained in:
@@ -67,6 +67,8 @@ export const focus: RawCommands['focus'] = (position = null) => ({
|
|||||||
if (dispatch) {
|
if (dispatch) {
|
||||||
tr.setSelection(selection)
|
tr.setSelection(selection)
|
||||||
|
|
||||||
|
// `tr.setSelection` resets the stored marks
|
||||||
|
// so we’ll restore them if the selection is the same as before
|
||||||
if (isSameSelection && storedMarks) {
|
if (isSameSelection && storedMarks) {
|
||||||
tr.setStoredMarks(storedMarks)
|
tr.setStoredMarks(storedMarks)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user