You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
transferred this issue from ckeditor/ckeditor5-engine
Oct 9, 2019
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 firechange
event. For example, ifRenameOperation
renames fromparagraph
toparagraph
, 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.The text was updated successfully, but these errors were encountered: