Skip to content

Commit

Permalink
fix(sync): Disable browser broadcast
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
max-nextcloud authored and backportbot[bot] committed Oct 1, 2024
1 parent d6a1119 commit 6c64d16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ export default {
fileId: this.fileId,
queue: this.$queue,
initialSession: this.initialSession,
disableBC: true,
})
this.$providers.push(syncServiceProvider)
this.forceRecreate = false
Expand Down

0 comments on commit 6c64d16

Please sign in to comment.