diff --git a/packages/client/src/automerge-editor.ts b/packages/client/src/automerge-editor.ts index 688173d..de9dce3 100644 --- a/packages/client/src/automerge-editor.ts +++ b/packages/client/src/automerge-editor.ts @@ -99,7 +99,9 @@ export const AutomergeEditor = { e.docSet.setDoc(docId, mergedDoc) Editor.withoutNormalizing(e, () => { - e.children = toJS(mergedDoc).children + const doc = toJS(mergedDoc) + e.children = doc.children + e.onCursor && e.onCursor(doc.cursors) }) // onChange expect valid doc, we make sure do normalization before that.