Bug 974258 Manually size autocomplete history popup to the autocomplete's width r=Ratty

DONTBUILD (SeaMonkey-specific code)

--HG--
extra : rebase_source : 4158685201d1edc8e7ced214e36f844ad36c3577
This commit is contained in:
Neil Rashbrook 2014-02-21 00:11:28 +00:00
parent 687b238274
commit f8b0bd0119

View File

@ -17,7 +17,7 @@
<stylesheet src="chrome://global/skin/autocomplete.css"/>
</resources>
<content sizetopopup="pref">
<content>
<children includes="menupopup"/>
<xul:hbox class="autocomplete-textbox-container" flex="1" align="center">
@ -1628,6 +1628,9 @@
var textbox = document.getBindingParent(this);
var kids = textbox.getElementsByClassName("autocomplete-history-popup");
if (kids.item(0) && textbox.getAttribute("open") != "true") { // Open history popup
var w = textbox.boxObject.width;
if (w != kids[0].boxObject.width)
kids[0].width = w;
kids[0].showPopup(textbox, -1, -1, "popup", "bottomleft", "topleft");
textbox.setAttribute("open", "true");
}