Closed
Bug 416250
Opened 18 years ago
Closed 7 years ago
Width of autocomplete popup hardcoded to match width of textbox
Categories
(Toolkit :: Autocomplete, defect)
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: alta88, Assigned: trentm)
References
(Depends on 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
1.67 KB,
patch
|
Details | Diff | Splinter Review | |
1.59 KB,
patch
|
Details | Diff | Splinter Review | |
5.40 KB,
patch
|
enndeakin
:
review-
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 XPCOMViewer/0.9.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008020604 Minefield/3.0b4pre ID:2008020604
in Fx2, setting sizetopopup=none would allow the popup to fit its contents, completely properly, exceeding the width of the url textbox if necessary.
this is no longer possible, and it's not good to hardcode the popup width to match the textbox. sizetopopup remains as an attribute, but unclear if it has any function.
http://mxr.mozilla.org/seamonkey/source/toolkit/content/widgets/autocomplete.xml#929
Reproducible: Always
Keywords: regression
Comment 1•17 years ago
|
||
Well, I guess minwidth should be used instead of width, rigth?
I tried that, but it caused bug 399316.
I guess minwidth could be used again once bug 399432 is fixed.
Depends on: 399432
no, using min-width is not the right solution. the popup's width should be as wide as the widest content element. this could mean the popup is narrower than the textbox, or wider. like in fx2.
Comment 3•17 years ago
|
||
Ok, thanks for the info.
I'm still a bit confused, though. The hardcoding of the popup width was already there at least in 2003, so I don't see how/when this sizetopopup thing stopped working.
Is there a chance you could make a testcase that showed that sizetopopup is working on branch, but not on trunk?
ok i did a bit more research. in Fx2 i had myurlbar_a (Fx3 urlbar now does a lot of what it used to do), and unless sizetopopup was removed or set to other than 'pref', the popup would match the textbox width. so i had a userchrome.js script to remove sizetopopup, and popup width matched the widest element. this stopped working in Fx3, but i realize it could be any number of reasons.
on a clean profile, regardless of sizetopopup value, both Fx2 and Fx3 urlbar popups are always the width of the texbox. native Fx2 didn't do anything interesting with autocomplete (like now) so it didn't matter much.
so i guess we can't say this is a regression (regardless of an extension working differently with sizetopupup gone).
but, with the Fx3 popup becoming vastly more useful and even tabular in layout, it would be a big enhancement to size it more correctly (to data or to user preference). ideally, an open panel could be drag sized and persisted. the popup also doesn't need to start at the textbox start.
Keywords: regression
Comment 5•17 years ago
|
||
I see that there was some discussion here:
http://groups.google.com/group/mozilla.dev.extensions/browse_thread/thread/9e39c9e24b74bbcc/f1eff0ff546837e3?#f1eff0ff546837e3
You used your own special urlbar named myurlbar_a? Ok, that means this never really worked in Firefox2.
So I guess that hardcoding of the width should only happen when sizetopopup is set to "always" or "pref".
The ability to resize popups is a different bug (already filed).
no myurlbar_a is an extension..
right,(In reply to comment #5)
> I see that there was some discussion here:
> http://groups.google.com/group/mozilla.dev.extensions/browse_thread/thread/9e39c9e24b74bbcc/f1eff0ff546837e3?#f1eff0ff546837e3
>
> You used your own special urlbar named myurlbar_a? Ok, that means this never
> really worked in Firefox2.
>
no myurlbar_a is an extension. and no, as i said, apparently not in Fx2 clean profile. regression has been removed.
> So I guess that hardcoding of the width should only happen when sizetopopup is
> set to "always" or "pref".
right, otherwise what's the purpose of the attribute?
>
> The ability to resize popups is a different bug (already filed).
>
great.
Comment 7•17 years ago
|
||
This seems to fix it.
Assignee | ||
Comment 8•17 years ago
|
||
Assignee | ||
Comment 9•17 years ago
|
||
This is a superset of Martijn's patch. Martijn's patch just fixed the issue for the "autocomplete-rich-result-popup" binding. This patch does that and the same fix to the "autocomplete-result-popup" as well.
Assignee | ||
Comment 10•17 years ago
|
||
Allow one to use
<textbox type="autocomplete" sizetopopup="none" autocompletepopup="myPopup" />
and
<panel type="autocomplete" id="myPopup" width="300"/>
to specify that the popup's width should NOT be set to that of the
textbox. When using this, one must manually set the width on the
popup widget (e.g., hardcoded to 300 in the example above).
Currently the popup is sized to the textbox's width regardless of the
value of "sizetopopup".
The `.removeAttribute("width")` call was added for this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=381084
Attachment #335456 -
Attachment is obsolete: true
Attachment #335813 -
Flags: review?(gavin.sharp)
Comment 11•17 years ago
|
||
Neil Deakin would probably be a better reviewer for this (enndeakin@gmail).
Updated•17 years ago
|
Component: Location Bar and Autocomplete → Autocomplete
Product: Firefox → Toolkit
QA Contact: location.bar → autocomplete
Version: unspecified → Trunk
Updated•17 years ago
|
Assignee: nobody → trentm
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•16 years ago
|
Attachment #335813 -
Flags: review?(gavin.sharp) → review?(enndeakin)
Comment 13•16 years ago
|
||
Comment on attachment 335813 [details] [diff] [review]
patch to fix on moz 1.9 (adds guarding against "width" being blown away)
>+ if (aElement.sizetopopup == "always" || aElement.sizetopopup == "pref") {
There is no 'sizetopopup' property.
Updated•16 years ago
|
Attachment #335813 -
Flags: review?(enndeakin) → review-
Comment 14•7 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•