Skip to content

Fix integration with undo. #2811

Closed
ckeditor/ckeditor5-upload
#39
@scofalik

Description

@scofalik

There are two main issues with upload and undo:

  • uploadStatus attribute is changed when undoing/redoing which is incorrect, because it should be only changed on upload changes. Also, the upload is already aborted but undo/redo may change the uploadStatus to incorrect value.

  • after refactoring RemoveOperation, History, OT and undo, removing of "image placeholder" can be undone, which is incorrect because that image upload is aborted when "image placeholder" is removed.

The solutions are:

  1. uploadStatus changes has to be done in separate, transparent batches (or, maybe even totally removed from model) so undo does not "see" them.
  2. removing of "image placeholder" has to be done using isPermanent flag, in separate batch (preferably a transparent batch, but normal batch should also work as permanent remove operation is reversed to NoOperation anyway).

Metadata

Metadata

Assignees

No one assigned

    Labels

    package:uploadtype:bugThis issue reports a buggy (incorrect) behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions