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

Fire the change event after uploading is done #5415

Merged
merged 10 commits into from
Feb 8, 2023
Merged

Fire the change event after uploading is done #5415

merged 10 commits into from
Feb 8, 2023

Conversation

Comandeer
Copy link
Member

What is the purpose of this pull request?

Bug fix

Does your PR contain necessary tests?

All patches that change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

Did you follow the CKEditor 4 code style guide?

Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.

  • PR is consistent with the code style guide

What is the proposed changelog entry for this pull request?

* [#5414](/~https://github.com/ckeditor/ckeditor4/issues/5414): Fixed: File and image uploaders based on the [Upload Widget plugin](https://ckeditor.com/cke4/addon/uploadwidget) and [Easy Image plugin ](https://ckeditor.com/cke4/addon/easyimage)didn't fire the [`change` event](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) upon finishing upload, resulting in passing incorrect data in form controls for integration frameworks, like [Reactive forms in Angular](https://angular.io/guide/reactive-forms).

What changes did you make?

In the case of easyimage, I've added firing of the change event at the end of the uploadDone listener.

In the case of uploadwidget and its dependents, I've added firing of the change event at the end of its replaceWith() method.

Which issues does your PR resolve?

Closes #5414.

Copy link
Contributor

@KarolDawidziuk KarolDawidziuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@jacekbogdanski could you make an additional sanity check if everything is good?

@KarolDawidziuk KarolDawidziuk removed their assignment Feb 8, 2023
@KarolDawidziuk KarolDawidziuk merged commit 647ad2e into master Feb 8, 2023
@KarolDawidziuk KarolDawidziuk deleted the t/5414 branch February 8, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The change event is not fired after uploading the image
2 participants