Bladeren bron

Cast string input to a boolean when binding isEnabled property.

Maciej Gołaszewski 5 jaren geleden
bovenliggende
commit
7611252ec9
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      packages/ckeditor5-image/src/imageinsert/ui/imageinsertpanelview.js

+ 1 - 1
packages/ckeditor5-image/src/imageinsert/ui/imageinsertpanelview.js

@@ -286,7 +286,7 @@ export default class ImageInsertPanelView extends View {
 			withText: true
 		} );
 
-		insertButtonView.bind( 'isEnabled' ).to( this, 'imageURLInputValue' );
+		insertButtonView.bind( 'isEnabled' ).to( this, 'imageURLInputValue', value => !!value );
 		insertButtonView.delegate( 'execute' ).to( this, 'submit' );
 		cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );