Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

textbox autocomplete popup list width

33 views
Skip to first unread message

marco.d...@gmail.com

unread,
Feb 6, 2008, 9:22:28 AM2/6/08
to
G'day all,

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

alta88

unread,
Feb 6, 2008, 12:58:13 PM2/6/08
to

try setting the sizetopopup attribute to 'none'.

Neil

unread,
Feb 7, 2008, 5:35:06 AM2/7/08
to
marco.d...@gmail.com wrote:

>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.

Marco Donizelli

unread,
Feb 7, 2008, 6:01:37 AM2/7/08
to Neil, dev-ext...@lists.mozilla.org
ooops...thanks anyway, appeciate help

> _______________________________________________
> 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

alta88

unread,
Feb 7, 2008, 7:15:09 PM2/7/08
to

sizetopopup=none works in Fx2, but not Fx3. this hardcoding of width is
not good; plus it's a regression.

filed https://bugzilla.mozilla.org/show_bug.cgi?id=416250.

Marco Donizelli

unread,
Feb 8, 2008, 8:09:50 AM2/8/08
to alta88, dev-ext...@lists.mozilla.org
>
> 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

alta88

unread,
Feb 8, 2008, 10:56:15 AM2/8/08
to

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");

0 new messages