зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1595875, fix handling of return value of FormAutoComplete:GetSelectedIndex that was incorrectly removed by 1573836, r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D52720 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d620f10c6d
Коммит
bf4c789cae
|
@ -182,9 +182,20 @@ class AutoCompleteChild extends JSWindowActorChild {
|
|||
// time it changes because not every action that can change the
|
||||
// selectedIndex is trivial to catch (e.g. moving the mouse over the
|
||||
// list).
|
||||
return Services.cpmm.sendSyncMessage("FormAutoComplete:GetSelectedIndex", {
|
||||
browsingContext: this.browsingContext,
|
||||
});
|
||||
let selectedIndexResult = Services.cpmm.sendSyncMessage(
|
||||
"FormAutoComplete:GetSelectedIndex",
|
||||
{
|
||||
browsingContext: this.browsingContext,
|
||||
}
|
||||
);
|
||||
|
||||
if (
|
||||
selectedIndexResult.length != 1 ||
|
||||
!Number.isInteger(selectedIndexResult[0])
|
||||
) {
|
||||
throw new Error("Invalid autocomplete selectedIndex");
|
||||
}
|
||||
return selectedIndexResult[0];
|
||||
}
|
||||
|
||||
get popupOpen() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче