зеркало из https://github.com/mozilla/gecko-dev.git
Bug 488357 - Item in location bar drop down highlighted after clicking same one on previous location bar usage. r=gavin
This commit is contained in:
Родитель
e78f8c7cd3
Коммит
30aea48414
|
@ -877,11 +877,6 @@
|
|||
var controller = this.view.QueryInterface(Components.interfaces.nsIAutoCompleteController);
|
||||
controller.stopSearch();
|
||||
|
||||
// when the popup hides, we need to clear the selection
|
||||
// otherwise we will use the value of the selected index when the
|
||||
// user hits enter.
|
||||
// see bug #400671 for details
|
||||
this.selectedIndex = -1;
|
||||
this.mPopupOpen = false;
|
||||
|
||||
// Reset the maxRows property to the cached "normal" value, and reset
|
||||
|
@ -953,10 +948,11 @@
|
|||
<![CDATA[
|
||||
if (!this.mPopupOpen) {
|
||||
this.mInput = aInput;
|
||||
// clear any previous selection, see bugs 400671 and 488357
|
||||
this.selectedIndex = -1;
|
||||
document.popupNode = null;
|
||||
|
||||
var rect = aElement.getBoundingClientRect();
|
||||
var width = rect.right - rect.left;
|
||||
var width = aElement.getBoundingClientRect().width;
|
||||
this.setAttribute("width", width > 100 ? width : 100);
|
||||
// invalidate() depends on the width attribute
|
||||
this._invalidate();
|
||||
|
|
|
@ -398,7 +398,7 @@
|
|||
for (var i = this.selectedItems.length - 1; i >= 0; --i)
|
||||
this.selectedItems[i].selected = false;
|
||||
|
||||
this.selectedItems.splice(0, this.selectedItems.length);
|
||||
this.selectedItems.length = 0;
|
||||
}
|
||||
|
||||
this._selectionStart = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче