Skip to content

Fix broken state when undoing after uploading

Himanshu Kapoor requested to merge 419095-uploading-undo-fix into master

What does this MR do and why?

Fix broken state when undoing after uploading

When undoing after uploading a file or image, the rich text editor is in a broken state. This change removes the image or link completely.

Changelog: fixed

Screenshots or screen recordings

Before After
Screen Recording 2024-01-08 at 16.45.10.mov Screen Recording 2024-01-08 at 16.53.19.mov
After undo, the image/video is still there with a broken link. If you save the comment, the image/video will be lost. After undo, the image/video will be removed. It will reappear on redo.

How to set up and validate locally

  1. In an issue comment, use rich text editor.
  2. Paste or upload an image or video. Wait for upload to finish.
  3. After undo, the image should be deleted, and not be a broken image.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #419095 (closed)

Edited by Himanshu Kapoor

Merge request reports