mirror of
https://github.com/google/material-design-lite.git
synced 2024-08-16 15:50:34 +03:00
Check placeholder value when setting dirty state.
This commit is contained in:
parent
df6196d581
commit
b84882629c
@ -175,7 +175,11 @@
|
||||
* @public
|
||||
*/
|
||||
MaterialTextfield.prototype.checkDirty = function() {
|
||||
if ((this.input_.value && this.input_.value.length > 0) || this.input_.placeholder) {
|
||||
var placeholder = this.input_.placeholder;
|
||||
if (
|
||||
(this.input_.value && this.input_.value.length > 0) ||
|
||||
(placeholder !== undefined || placeholder.trim() !== "")
|
||||
) {
|
||||
this.element_.classList.add(this.CssClasses_.IS_DIRTY);
|
||||
} else {
|
||||
this.element_.classList.remove(this.CssClasses_.IS_DIRTY);
|
||||
|
Loading…
Reference in New Issue
Block a user