|
@@ -313,9 +313,8 @@ export default class LinkUI extends Plugin {
|
|
|
*/
|
|
*/
|
|
|
_removeFormView() {
|
|
_removeFormView() {
|
|
|
if ( this._isFormInPanel ) {
|
|
if ( this._isFormInPanel ) {
|
|
|
- // Blur the input element before removing it from DOM.
|
|
|
|
|
|
|
+ // Blur the input element before removing it from DOM to prevent issues in some browsers.
|
|
|
// See https://github.com/ckeditor/ckeditor5/issues/1501.
|
|
// See https://github.com/ckeditor/ckeditor5/issues/1501.
|
|
|
- // Focusing editable before removing FormView makes balloon flickering.
|
|
|
|
|
this.formView.saveButtonView.focus();
|
|
this.formView.saveButtonView.focus();
|
|
|
|
|
|
|
|
this._balloon.remove( this.formView );
|
|
this._balloon.remove( this.formView );
|
|
@@ -377,9 +376,8 @@ export default class LinkUI extends Plugin {
|
|
|
|
|
|
|
|
this.stopListening( editor.ui, 'update' );
|
|
this.stopListening( editor.ui, 'update' );
|
|
|
|
|
|
|
|
- // Make sure the focus always gets back to the editable
|
|
|
|
|
- // before removing currently focused views.
|
|
|
|
|
- // See https://github.com/ckeditor/ckeditor5-link/issues/193.
|
|
|
|
|
|
|
+ // Make sure the focus always gets back to the editable _before_ removing the focused form view.
|
|
|
|
|
+ // Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.
|
|
|
editor.editing.view.focus();
|
|
editor.editing.view.focus();
|
|
|
|
|
|
|
|
// Remove form first because it's on top of the stack.
|
|
// Remove form first because it's on top of the stack.
|