Parcourir la source

Removed obsolete editor.ui.focusTracker integration from the ImageTextAlternative. Residue of ckeditor/ckeditor5-image/#96.

Aleksander Nowodzinski il y a 8 ans
Parent
commit
d111b9b085

+ 0 - 7
packages/ckeditor5-image/src/imagetextalternative.js

@@ -126,13 +126,6 @@ export default class ImageTextAlternative extends Plugin {
 			}
 			}
 		}, { priority: 'low' } );
 		}, { priority: 'low' } );
 
 
-		// Hide the form when the editor is blurred.
-		this.listenTo( editor.ui.focusTracker, 'change:isFocused', ( evt, name, is ) => {
-			if ( !is ) {
-				this._hideForm();
-			}
-		}, { priority: 'low' } );
-
 		// Close on click outside of balloon panel element.
 		// Close on click outside of balloon panel element.
 		clickOutsideHandler( {
 		clickOutsideHandler( {
 			emitter: this._form,
 			emitter: this._form,

+ 0 - 14
packages/ckeditor5-image/tests/imagetextalternative.js

@@ -170,20 +170,6 @@ describe( 'ImageTextAlternative', () => {
 			} );
 			} );
 		} );
 		} );
 
 
-		describe( 'integration with the editor focus', () => {
-			it( 'should hide the toolbar when the editor loses focus and the image is selected', () => {
-				editor.ui.focusTracker.isFocused = true;
-
-				setData( doc, '[<image src=""></image>]' );
-				button.fire( 'execute' );
-
-				const spy = sinon.spy( balloon, 'remove' );
-
-				editor.ui.focusTracker.isFocused = false;
-				sinon.assert.calledWithExactly( spy, form );
-			} );
-		} );
-
 		describe( 'close listeners', () => {
 		describe( 'close listeners', () => {
 			describe( 'keyboard', () => {
 			describe( 'keyboard', () => {
 				it( 'should close upon Esc key press and focus the editing view', () => {
 				it( 'should close upon Esc key press and focus the editing view', () => {