Skip to content

Bug: [lexical-y] A command an update listener dispatches on the commit of a local update a remote change was applied inside is not stored #9805

Open

Description

@zurfyx

@lexical/y: an app's update listener, registered after the binding, that dispatches a command editing the document on the commit of a local update a provider applied a remote change inside (D108 defers that change's read) has its edit shown but never stored: the editor shows two# while the document, the peers and a fresh reader keep two, with no self-check warning.

The command's update begins at once (updateEditorSync), and its $processNestedUpdates runs the read of the deferred change the binding already queued inside it, so the edit commits under the read's collaboration tags and is not written. main behaves the same. A test.fails cell in packages/lexical-y/src/__tests__/unit/regressions/MutationListenerEdit.test.ts reproduces it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions