Bug 1401657 - Make editor value changes always notify. r=masayuki
Not doing so is unsound in some cases, see the two referenced bugs. Differential Revision: https://phabricator.services.mozilla.com/D66697
This commit is contained in:
@@ -1112,7 +1112,7 @@ void HTMLTextAreaElement::InitializeKeyboardEventListeners() {
|
||||
mState->InitializeKeyboardEventListeners();
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::OnValueChanged(bool aNotify, ValueChangeKind aKind) {
|
||||
void HTMLTextAreaElement::OnValueChanged(ValueChangeKind aKind) {
|
||||
if (aKind != ValueChangeKind::Internal) {
|
||||
mLastValueChangeWasInteractive = aKind == ValueChangeKind::UserInteraction;
|
||||
}
|
||||
@@ -1123,9 +1123,8 @@ void HTMLTextAreaElement::OnValueChanged(bool aNotify, ValueChangeKind aKind) {
|
||||
UpdateTooShortValidityState();
|
||||
UpdateValueMissingValidityState();
|
||||
|
||||
if (validBefore != IsValid() ||
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder)) {
|
||||
UpdateState(aNotify);
|
||||
if (validBefore != IsValid() || HasAttr(nsGkAtoms::placeholder)) {
|
||||
UpdateState(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user