Closed Bug 335453 Opened 20 years ago Closed 18 years ago

can't get to form selection from dropdown list

Categories

(Minimo Graveyard :: General, defect)

WinCE
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 314939

People

(Reporter: chofmann, Assigned: dougt)

References

Details

I tried going though the check out on amazon using latest minimo build. everything went ok until I hit a form with a list of years for the expiration date on my ccard. my year of expiration was off the end of the list of the years that could be displayed (. I imagine it would be the same for any long dropdown list on any page. I'll try to drum up a test case..
looks like firefox has a vertical scroll bar on the list box for this situation
The default number of rows visable in a drop down is 20. Any more rows, then the select will have a scrollbar. in mozilla/layout/forms/nsListControlFrame.cpp, line 99: const nscoord kMaxDropDownRows = 20; // This matches the setting for 4.x browsers This is the interesting starting point. If i set this to 8, you get what you want -- a select that doesn't have options floating off the screen. If I were to guess, the "adaptive algorithm" on line 989 is suspect.
We never even get to the adaptive algorithm, do we? We only hit that code if 886 if (visibleHeight > (mNumDisplayRows * heightOfARow)) { (as in, if our height is bigger than kMaxDropDownRows * heightOfARow, considering the previous line is 885 mNumDisplayRows = kMaxDropDownRows; If we're serious about the adaptive stuff, we should remove that check, probably...
In firefox we do hit it. for a simple select text case i made up, i see us entering this the block under the if with the following: visibleHeight 5040 heightOfARow 240
240 * 20 = 4800. How many rows did your <select> have? My point was that if it has fewer than 20 rows, we won't enter that code.
I had kMaxDropDownRows = 8. This result seams to be what I want on a qvga screen.
Right. My point is we only use the adaptive algorithm once we're over kMaxDropDownRows right now. Maybe we should change that.
Summary: can't get to form selection selection from dropdown list → can't get to form selection from dropdown list
roc, bz, in the short term, would like to see a preference for the maximum number of items in a select before we add a scrollbar?
Are we talking trunk or 1.8 branch? On trunk, I'm going to somewhat heavily modify this code.
Bz, i mostly care about the 1.8 Branch -- this is where I am shipping from for the next year (at least). However, i would like this problem to go away also on the trunk. For the branch, would you advise simply using a pref to control the kMaxDropDownRow?
Probably... You could nix the whole thing and just always do window-based sizing, but that would need some perf testing.
bz, care to put up a strawman patch for testing? :-)
Not likely to happen until July on this end. :(
Depends on: 314939
bz, this is a dup of 314939, right?
More or less, I think. That bug is going off into behavior-change boonies that I'm not sure this bug wants to be saddled with...
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.