diff --git a/src/inlineeditorui.js b/src/inlineeditorui.js index 262abe4..88e6137 100644 --- a/src/inlineeditorui.js +++ b/src/inlineeditorui.js @@ -49,7 +49,7 @@ export default class InlineEditorUI extends EditorUI { } // https://github.com/ckeditor/ckeditor5-editor-inline/issues/4 - view.listenTo( editor.editing.view, 'render', () => { + view.listenTo( editor.ui, 'update', () => { // Don't pin if the panel is not already visible. It prevents the panel // showing up when there's no focus in the UI. if ( view.panel.isVisible ) { diff --git a/tests/inlineeditorui.js b/tests/inlineeditorui.js index 99375d5..f7927c3 100644 --- a/tests/inlineeditorui.js +++ b/tests/inlineeditorui.js @@ -80,17 +80,17 @@ describe( 'InlineEditorUI', () => { } ); // https://github.com/ckeditor/ckeditor5-editor-inline/issues/4 - it( 'pin() is called on editor.editable.view#render', () => { + it( 'pin() is called on editor.ui#update', () => { const spy = sinon.stub( view.panel, 'pin' ); view.panel.hide(); - editor.editing.view.render(); + editor.ui.fire( 'update' ); sinon.assert.notCalled( spy ); view.panel.show(); - editor.editing.view.render(); + editor.ui.fire( 'update' ); sinon.assert.calledOnce( spy ); sinon.assert.calledWithExactly( spy, { target: view.editableElement,