Explorar o código

Made code more obvious.

Oskar Wróbel %!s(int64=7) %!d(string=hai) anos
pai
achega
6f4c65fbb7

+ 5 - 2
packages/ckeditor5-ui/src/toolbar/balloon/balloontoolbar.js

@@ -59,8 +59,11 @@ export default class BalloonToolbar extends Plugin {
 		 * @type {module:utils:focustracker~FocusTracker}
 		 */
 		this.focusTracker = new FocusTracker();
-		this.focusTracker.add( this.toolbarView.element );
-		editor.once( 'uiReady', () => this.focusTracker.add( editor.ui.view.editableElement ) );
+		// Wait for the EditorUI#init. EditableElement is not available before.
+		editor.once( 'uiReady', () => {
+			this.focusTracker.add( editor.ui.view.editableElement );
+			this.focusTracker.add( this.toolbarView.element );
+		} );
 
 		/**
 		 * The contextual balloon plugin instance.