Bug 1272297 - Do not check pattern validity while parser is creating this input element. r=smaug

This commit is contained in:
Ben Tian
2016-08-09 15:21:15 +08:00
parent 1641e52c61
commit b88821b9a2

View File

@@ -1468,7 +1468,7 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
}
} else if (MaxLengthApplies() && aName == nsGkAtoms::maxlength) {
UpdateTooLongValidityState();
} else if (aName == nsGkAtoms::pattern) {
} else if (aName == nsGkAtoms::pattern && !mParserCreating) {
UpdatePatternMismatchValidityState();
} else if (aName == nsGkAtoms::multiple) {
UpdateTypeMismatchValidityState();