Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration with undo. #2811

Closed
scofalik opened this issue Jun 24, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-upload#39
Closed

Fix integration with undo. #2811

scofalik opened this issue Jun 24, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-upload#39
Labels
package:upload type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@scofalik
Copy link
Contributor

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).
Reinmar referenced this issue in ckeditor/ckeditor5-upload Jul 6, 2017
Fix: When image upload is aborted, now the "image placeholder" element is permanently removed so it is not reinserted on undo. Closes #38.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-upload Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:upload labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:upload type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants