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

Docs: Improvements in LinkUI doc strings. [skip ci]

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
2226599a51
1 измененных файлов с 3 добавлено и 5 удалено
  1. 3 5
      packages/ckeditor5-link/src/linkui.js

+ 3 - 5
packages/ckeditor5-link/src/linkui.js

@@ -313,9 +313,8 @@ export default class LinkUI extends Plugin {
 	 */
 	_removeFormView() {
 		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.
-			// Focusing editable before removing FormView makes balloon flickering.
 			this.formView.saveButtonView.focus();
 
 			this._balloon.remove( this.formView );
@@ -377,9 +376,8 @@ export default class LinkUI extends Plugin {
 
 		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();
 
 		// Remove form first because it's on top of the stack.