From 3a8718493a8d53f8bf299fd90d6dc062ad9879c0 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 4ed6d9c5385..a4fe9342b86 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -390,6 +390,7 @@ export default { fileId: this.fileId, queue: this.$queue, initialSession: this.initialSession, + disableBC: true, }) this.$providers.push(syncServiceProvider) this.forceRecreate = false