Skip to content

RTC: Cursor is out of sync when editing multi-attribute blocks #77654

@JDeepD

Description

@JDeepD

Description

When collaborating in RTC using blocks that contain multiple RichText fields (such as the Quote or Pullquote blocks), making text selections or edits in a secondary field (like citation) causes the cursor to be shown in wrong position in other clients.

buggy-cursor-quote-block.mov

From what I can notice, the cursor is off by exactly the length of the first attribute.

Step-by-step reproduction instructions

  1. Open a collaborative session with two users (User A and User B).
  2. Insert a Quote block.
  3. Set the value (quote body) to: hello
  4. Set the citation to: testing
  5. Have User A place their cursor at the very end of the citation: testing|
  6. Look at User B's screen. User A's remote cursor will be rendered at 5 places (length of “hello”) behind the actual position: te|sting.

Screenshots, screen recording, code snippet

This can be reproduced on other multi-attribute blocks like "File" and "Pull Quote" as well.

cursor-off.mov

Environment info

  • WordPress: 7.1-alpha-62191
  • Gutenberg (23.0.0)
  • Chrome on MacOS 26.4

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Real-time CollaborationPhase 3 of the Gutenberg roadmap around real-time collaboration[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions