From 527fc318c749d72d8ad075e9cc25ec982daf6322 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 30 Sep 2024 15:18:16 +0200 Subject: [PATCH] fix(sync): Disable browser broadcast Ensure the browser broadcast does not lead to out of sync docs. If a tab fails to send a step over the network it may still distributes it to a different tab / window via the browser broadcast. That other window will include the step in the yjs history without forwarding it to other parties. From that point on all changes in the second tab will depend on the step that other clients did not receive. Therefore these changes will not be applied at other parties. To prevent this scenario disable browser broadcast completely. Signed-off-by: Max --- src/components/Editor.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 60a1df827f4..df97144a5f3 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -392,6 +392,7 @@ export default { fileId: this.fileId, queue: this.$queue, initialSession: this.initialSession, + disableBC: true, }) this.$providers.push(syncServiceProvider) this.forceRecreate = false