Skip to content

Undo of last tracked-change suggestion leaves orphan comment in UI #2186

@wasimrehman05

Description

@wasimrehman05

What happened?

In suggesting mode, when a user makes a change, the text is highlighted (via track-change marks) and a comment is automatically created. When there is only one suggestion and the user presses Undo, the
highlight is correctly removed from the text, but the comment remains visible in the UI. When there are multiple suggestions, undo works correctly for all of them. The bug only manifests when undoing the
last (or only) tracked-change comment.

Steps to reproduce

  1. Open a document in edit mode
  2. Enable suggesting mode (track changes)
  3. Type some text — a suggestion highlight and comment are created
  4. Press Ctrl+Z (Undo)
  5. Expected: Both the highlight and the comment are removed
  6. Actual: The highlight is removed but the comment remains visible

SuperDoc version

1.16.0

Browser

Chrome

Additional context

  • Works correctly when there are multiple suggestions — undoing any one of them correctly removes both highlight and comment
  • The bug only occurs when undoing the last remaining suggestion
  • Redo (Ctrl+Shift+Z) after the undo should restore both the highlight and the comment

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions