Selaa lähdekoodia

Ensure that submitOps is called in a timeout (#15840)

GitOrigin-RevId: f4b5f9649a18e5e0ea2332b6e8c90426d7c055d6
Alf Eaton 2 vuotta sitten
vanhempi
sitoutus
604b4e5fdb

+ 1 - 1
services/web/frontend/js/features/source-editor/extensions/changes/comments.ts

@@ -153,7 +153,7 @@ const submitOpsAfterEvent = (
   // TODO: could put this in an update listener instead, if the ShareJS doc has been updated by then?
   currentDoc.on(eventName, () => {
     currentDoc.off(eventName)
-    submitOps(currentDoc, ops, transaction)
+    window.setTimeout(() => submitOps(currentDoc, ops, transaction))
   })
 }