Backed out changeset cbff87ac70e9 (bug 1892357) for causing mochitests failures in test_clear_form.html.

This commit is contained in:
Stanca Serban 2024-04-23 22:12:51 +03:00
Родитель 1e6735c95b
Коммит 902f1b5727
2 изменённых файлов: 7 добавлений и 18 удалений

Просмотреть файл

@ -124,17 +124,6 @@ add_task(async function simple_clear() {
await triggerPopupAndHoverItem("#tel", 0);
await confirmClear("#tel");
await checkIsFormCleared();
// Ensure the correctness of the autocomplete popup after the form is cleared
synthesizeKey("KEY_ArrowDown");
await expectPopup();
checkMenuEntries(MOCK_ADDR_STORAGE.filter(address => !!address.tel).map(address =>
JSON.stringify({
primary: address.tel,
secondary: FormAutofillUtils.toOneLineAddress(address["street-address"]) || address.organization,
status: "Also autofills address, organization"
})
), 2);
});
add_task(async function clear_adapted_record() {

Просмотреть файл

@ -490,13 +490,6 @@ nsAutoCompleteController::HandleKeyNavigation(uint32_t aKey, bool* _retval) {
}
}
// Some script may have changed the value of the text field since our
// last keypress or after our focus handler and we don't want to
// search for a stale string.
nsAutoString value;
input->GetTextValue(value);
SetSearchStringInternal(value);
// Open the popup if there has been a previous non-errored search, or
// else kick off a new search
bool hadPreviousSearch = false;
@ -529,6 +522,13 @@ nsAutoCompleteController::HandleKeyNavigation(uint32_t aKey, bool* _retval) {
return NS_OK;
}
// Some script may have changed the value of the text field since our
// last keypress or after our focus handler and we don't want to
// search for a stale string.
nsAutoString value;
input->GetTextValue(value);
SetSearchStringInternal(value);
StartSearches();
}