-
Notifications
You must be signed in to change notification settings - Fork 40
Prevented View
from firing the render
event if there were no changes since the last view.render()
call
#1661
Conversation
I see that there's one test failing in the |
Looks promising. I checked all usage of the It makes a huge number of tests fail, but mostly because of the missing
Only 8 tests are failing (4 in |
Could you clarify then how the |
I checked this branch in the context of ckeditor/ckeditor5#479 constellation and it seems to be working. |
I pushed one more commit to my POC. |
I've just merged your proposal @pjasiun to that branch. |
@@ -386,7 +409,8 @@ export default class View { | |||
* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `applying-view-changes-on-rendering` when | |||
* trying to re-render when rendering to DOM has already started. | |||
*/ |
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 think you should add to this docs that this method does not need to be used after changes in the view - they will cause rendering anyway. This method is dedicated to special cases when view does not change be need to be rendered anyway (for instance for some observers which overwrites DOM changes if they were not handled).
Only a view docs improvements needed. |
I've fixed the placeholder implementation (wrapped initial changes in the |
Co-Authored-By: ma2ciek <ma2ciek@gmail.com>
Suggested merge commit message (convention)
Fix: Prevented
View
from firing therender
event if there were no changes since the last rendering. Closes ckeditor/ckeditor5#4473. Closes ckeditor/ckeditor5#4475.Additional information
editing.view.render()
method was renamed toediting.view.forceRender()
. It should be used with caution as it will re-render editing view and repaint the UI.