Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Internal: Updated the usage of UI components which are now driven by …
Browse files Browse the repository at this point in the history
…synchronous initialization and destruction (see https://github.com/ckeditor/ckeditor5-ui/issues/225).
  • Loading branch information
Reinmar committed Jul 5, 2017
2 parents 0e59c31 + 76e88f0 commit d58e200
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 243 deletions.
13 changes: 5 additions & 8 deletions src/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ export default class Link extends Plugin {
*
* @protected
* @param {Boolean} [focusInput=false] When `true`, link form will be focused on panel show.
* @return {Promise} A promise resolved when the {@link #formView} {@link module:ui/view~View#init} is done.
*/
_showPanel( focusInput ) {
const editor = this.editor;
Expand Down Expand Up @@ -280,17 +279,15 @@ export default class Link extends Plugin {
if ( focusInput && this._balloon.visibleView === this.formView ) {
this.formView.urlInputView.select();
}

return Promise.resolve();
} else {
return this._balloon.add( {
this._balloon.add( {
view: this.formView,
position: this._getBalloonPositionData()
} ).then( () => {
if ( focusInput ) {
this.formView.urlInputView.select();
}
} );

if ( focusInput ) {
this.formView.urlInputView.select();
}
}
}

Expand Down
Loading

0 comments on commit d58e200

Please sign in to comment.