-
Notifications
You must be signed in to change notification settings - Fork 40
Stop invoking view.render()
by EditingController
when the model document isn't changed
#1657
Conversation
…ocumentChangedFromTheLastChangeBlock`.
src/model/document.js
Outdated
* @protected | ||
* @returns {Boolean} Returns `true` if document has changed from the differ's reset. | ||
*/ | ||
_hasDocumentChanged() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_hasDocumentChanged() { | |
_hasDocumentChangedFromTheLastChangeBlock() { |
src/model/document.js
Outdated
* @fires change:data | ||
* @param {module:engine/model/writer~Writer writer} writer The writer on which post-fixers will be called. | ||
*/ | ||
_runPostFixersAndResetDiffer( writer ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_runPostFixersAndResetDiffer( writer ) { | |
_handleChangeBlock( writer ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like the current name. The most important thing this method does is firing document#change
. However, _runPostFixersAndFireChangeAndResetDiffer
sounds ridiculous, so I am for shorter _handleChangeBlock
// Collect an information whether the model document has changed during from the last pending change. | ||
hasModelDocumentChanged = hasModelDocumentChanged || this.document._hasDocumentChanged(); | ||
|
||
// Fire '_change' event before resetting differ. | ||
this.fire( '_change', this._currentWriter ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be marked as deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This event is marked as deprecated on the bottom of that file.
Suggested merge commit message (convention)
Fix: Stopped invoking
view.render()
byEditingController
when the model document isn't changed. Closes ckeditor/ckeditor5#4473.Additional information
Model#_change
event marked as deprecated._handleChangeBlock()
._hasDocumentChangedFromTheLastChangeBlock()
.