Skip to content

Commit

Permalink
Fix placeholder check for dirty state
Browse files Browse the repository at this point in the history
  • Loading branch information
Garbee committed Jun 27, 2017
1 parent b848826 commit 60f441a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/textfield/textfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,9 @@
* @public
*/
MaterialTextfield.prototype.checkDirty = function() {
var placeholder = this.input_.placeholder;
if (
(this.input_.value && this.input_.value.length > 0) ||
(placeholder !== undefined || placeholder.trim() !== "")
(this.input_.placeholder.trim() !== '')

This comment has been minimized.

Copy link
@yurylucas

yurylucas Jul 28, 2022

Olá Mundo

) {
this.element_.classList.add(this.CssClasses_.IS_DIRTY);
} else {
Expand Down

1 comment on commit 60f441a

@itzycsco
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/textfield/textfield.js

Please sign in to comment.