Browse Source

Use InputTextView#input event instead of #keydown to remove error notifications (to exclude tab, arrows, etc.).

Aleksander Nowodzinski 7 years ago
parent
commit
859b0ad980

+ 1 - 2
packages/ckeditor5-ui/src/inputtext/inputtextview.js

@@ -80,8 +80,7 @@ export default class InputTextView extends View {
 				readonly: bind.to( 'isReadOnly' )
 			},
 			on: {
-				keydown: bind.to( 'keydown' ),
-				change: bind.to( 'change' )
+				input: bind.to( 'input' )
 			}
 		} );
 	}

+ 2 - 1
packages/ckeditor5-ui/src/labeledinput/labeledinputview.js

@@ -139,7 +139,8 @@ export default class LabeledInputView extends View {
 		inputView.bind( 'value' ).to( this );
 		inputView.bind( 'isReadOnly' ).to( this );
 		inputView.bind( 'hasError' ).to( this, 'errorText', value => !!value );
-		inputView.on( 'keydown', () => {
+
+		inputView.on( 'input', () => {
 			// UX: Make the error text disappear and disable the error indicator as the user
 			// starts fixing the errors.
 			this.errorText = false;