Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Document syncing doesn't work properly in certain batching scenarios #1688

@njx

Description

@njx

In this scenario:

  1. Inline editor and main editor are open on the same doc
  2. In the inline editor, an operation starts (e.g. because of keydown)
  3. During that operation, an edit is made in the underlying doc (== the main editor)

The main editor gets corrupted. This is because the document syncing flag guards rely on all happening within a single operation batch, but in the case above, the outer operation in the inline editor doesn't complete until after all the document syncing flag guards are reset, and it then sends out a change event back to the main editor, doubling the edit.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions