Bug 1849122, allowing getting and modifying the autofill state directly within the input and select elements, and reset this state when its value changes, r=webidl,emilio
Resetting the state when the value is modified is bug 1359355. Differential Revision: https://phabricator.services.mozilla.com/D210999
This commit is contained in:
@@ -6975,6 +6975,10 @@ void HTMLInputElement::OnValueChanged(ValueChangeKind aKind,
|
||||
MOZ_ASSERT_IF(aKnownNewValue, aKnownNewValue->IsEmpty() == aNewValueEmpty);
|
||||
if (aKind != ValueChangeKind::Internal) {
|
||||
mLastValueChangeWasInteractive = aKind == ValueChangeKind::UserInteraction;
|
||||
|
||||
if (State().HasState(ElementState::AUTOFILL)) {
|
||||
RemoveStates(ElementState::AUTOFILL | ElementState::AUTOFILL_PREVIEW);
|
||||
}
|
||||
}
|
||||
|
||||
if (aNewValueEmpty != IsValueEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user