I have a Firefox autocomplete textbox in my extension,
and sometimes the text results listed in the textbox
popup list (which has the same width as the textbox)
are quite long, and they are cropped with the '...' ellipsis
as per default behavior.
Is there any way to override that, so that I can set a larger
width for the popup list (or the menuitems) without having
to resize the textbox?
I have already tried the CSS max-width:none tip from the
docs.
thanks in a million
m
try setting the sizetopopup attribute to 'none'.
>Is there any way to override that, so that I can set a larger width for the popup list (or the menuitems) without having to resize the textbox?
>
>
IIRC the popup is hardcoded to open at the same size as the textbox. See:
http://mxr.mozilla.org/seamonkey/source/toolkit/content/widgets/autocomplete.xml#929
--
Warning: May contain traces of nuts.
> _______________________________________________
> dev-extensions mailing list
> dev-ext...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-extensions
>
--
Marco Donizelli
Senior System Developer
bMenu AS
+47 41731128
sizetopopup=none works in Fx2, but not Fx3. this hardcoding of width is
not good; plus it's a regression.
ok, so if FF2 by setting the attribute "sizetopopup" = "none"
for my textbox autocomplete should be enough to see the
items in the drop-down list span outside the textbox width
boundaries? because that is not the case. I tried the
combination of the following:
XUL:
<textbox id="auto-textbox" type="autocomplete" autocompletesearch="..."/>
JS:
var textbox = document.getElementById("auto-textbox");
textbox.setAttribute("crop", "none");
textbox.setAttribute("sizetopopup", "none");
CSS:
#auto-textbox menupopup > menuitem
{
max-width: none !important;
}
but with no success...... any hint what am I missing
or mistaking?
thanks
m
i just have this is my Fx2 userchrome.js:
document.getElementById("urlbar").setAttribute("sizetopopup", "none");
and for anon elements like in searchbar, i use this:
var searchbar = BrowserSearch.getSearchBar();
if (searchbar) document.getAnonymousElementByAttribute(searchbar,
"anonid", "searchbar-textbox")
.setAttribute("sizetopopup", "none");