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

Every operation execution should lead to firing change event #4160

Closed
scofalik opened this issue Aug 23, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1100
Closed
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@scofalik
Copy link
Contributor

So, there was an idea that if the operation didn't do anything, it might not return any data and thus not cause model.Document to fire change event. For example, if RenameOperation renames from paragraph to paragraph, it didn't do anything in _execute, so why fire all the mechanisms (change dispatchers, conversion, etc.)

This is unfortunately a wrong concept. Even if it did resolved some problems, this is wrong. There might be a plugin that want to react to every applied operation and it might need to do something no matter whether the operation did change the model.

Skipping firing change event for some operations may lead to errors, for example if given plugin counts operations, want to retrieve something from history or bases on document version.

@scofalik scofalik self-assigned this Aug 23, 2017
pjasiun referenced this issue in ckeditor/ckeditor5-engine Aug 25, 2017
Other: From now, every operation execution will fire `model.Document#event:change`, even if the operation "does not do" anything (for example, if operation changes attribute to the same value). Closes #1099.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added module:model type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
2 participants