Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix(text-field): Update character counter to update when value is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
williamernest committed May 1, 2019
1 parent c321f60 commit 837870f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mdc-textfield/foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ export class MDCTextFieldFoundation extends MDCFoundation<MDCTextFieldAdapter> {
// Prevent Safari from moving the caret to the end of the input when the value has not changed.
if (this.getValue() !== value) {
this.getNativeInput_().value = value;
this.setCharacterCounter_(value.length);
}
this.setCharacterCounter_(value.length);
const isValid = this.isValid();
this.styleValidity_(isValid);
if (this.adapter_.hasLabel()) {
Expand Down

0 comments on commit 837870f

Please sign in to comment.