8
0
Просмотр исходного кода

Aligned ContextualBalloon to the View#render API.

Aleksander Nowodzinski 8 лет назад
Родитель
Сommit
fe46e43e44

+ 3 - 3
packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js

@@ -79,11 +79,11 @@ export default class ContextualBalloon extends Plugin {
 		 */
 		 */
 		this._stack = new Map();
 		this._stack = new Map();
 
 
-		// Editor should be focused when contextual balloon is focused.
-		this.editor.ui.focusTracker.add( this.view.element );
-
 		// Add balloon panel view to editor `body` collection and wait until view will be ready.
 		// Add balloon panel view to editor `body` collection and wait until view will be ready.
 		this.editor.ui.view.body.add( this.view );
 		this.editor.ui.view.body.add( this.view );
+
+		// Editor should be focused when contextual balloon is focused.
+		this.editor.ui.focusTracker.add( this.view.element );
 	}
 	}
 
 
 	/**
 	/**

+ 1 - 1
packages/ckeditor5-ui/tests/panel/balloon/contextualballoon.js

@@ -48,7 +48,7 @@ describe( 'ContextualBalloon', () => {
 					}
 					}
 				} );
 				} );
 
 
-				viewB.init();
+				viewB.render();
 			} );
 			} );
 	} );
 	} );