Ver código fonte

Shorter bind declaration for adding the `.ck-read-only` class.

Co-Authored-By: dkonopka <dk@damiankonopka.pl>
Aleksander Nowodzinski 7 anos atrás
pai
commit
7b17123831

+ 1 - 1
packages/ckeditor5-ui/src/editableui/editableuiview.js

@@ -40,7 +40,7 @@ export default class EditableUIView extends View {
 					'ck-editor__editable',
 					'ck-rounded-corners',
 					bind.to( 'isFocused', value => value ? 'ck-focused' : 'ck-blurred' ),
-					bind.to( 'isReadOnly', value => value ? 'ck-read-only' : '' )
+					bind.if( 'isReadOnly', 'ck-read-only' )
 
 				],
 				contenteditable: bind.to( 'isReadOnly', value => !value ),