зеркало из https://github.com/mozilla/gecko-dev.git
Bug 943735 - Fix Metro autocomplete binding setters [r=emtwo]
This commit is contained in:
Родитель
fb2e9e2451
Коммит
75451b20b4
|
@ -551,7 +551,9 @@
|
|||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
return this._isGridBound(this._results) ? this._results.selectedItem : null;
|
||||
if (this._isGridBound(this._results)) {
|
||||
this._results.selectedItem = val;
|
||||
}
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
|
@ -564,7 +566,9 @@
|
|||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
return this._isGridBound(this._results) ? this._results.selectedIndex : -1;
|
||||
if (this._isGridBound(this._results)) {
|
||||
this._results.selectedIndex = val;
|
||||
}
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
|
|
|
@ -369,6 +369,10 @@ gTests.push({
|
|||
|
||||
EventUtils.synthesizeKey("VK_UP", {}, window);
|
||||
is(gEdit.popup._results.selectedIndex, 0, "Pressing arrow up selects first item.");
|
||||
|
||||
EventUtils.synthesizeKey("VK_BACK_SPACE", {}, window);
|
||||
yield waitForEvent(document.getElementById("urlbar-edit"), "input");
|
||||
is(gEdit.popup._results.selectedIndex, -1, "backspace: autocomplete de-selected");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче