Ver código fonte

Merge branch 'master' into i/4614

Marek Lewandowski 5 anos atrás
pai
commit
5ae65cb079

+ 4 - 1
packages/ckeditor5-image/src/imagestyle/imagestyleui.js

@@ -92,7 +92,10 @@ export default class ImageStyleUI extends Plugin {
 			view.bind( 'isEnabled' ).to( command, 'isEnabled' );
 			view.bind( 'isOn' ).to( command, 'value', value => value === style.name );
 
-			this.listenTo( view, 'execute', () => editor.execute( 'imageStyle', { value: style.name } ) );
+			this.listenTo( view, 'execute', () => {
+				editor.execute( 'imageStyle', { value: style.name } );
+				editor.editing.view.focus();
+			} );
 
 			return view;
 		} );

+ 3 - 1
packages/ckeditor5-image/src/imagetextalternative/imagetextalternativeui.js

@@ -78,7 +78,9 @@ export default class ImageTextAlternativeUI extends Plugin {
 
 			view.bind( 'isEnabled' ).to( command, 'isEnabled' );
 
-			this.listenTo( view, 'execute', () => this._showForm() );
+			this.listenTo( view, 'execute', () => {
+				this._showForm();
+			} );
 
 			return view;
 		} );

+ 1 - 1
packages/ckeditor5-image/tests/imagestyle/imagestylecommand.js

@@ -35,7 +35,7 @@ describe( 'ImageStyleCommand', () => {
 	} );
 
 	it( 'command value should be false if no image is selected', () => {
-		setData( model, '[]<image></image>' );
+		setData( model, '<p>[]</p><image></image>' );
 
 		expect( command.value ).to.be.false;
 	} );