Closed
Bug 506481
Opened 16 years ago
Closed 16 years ago
selected item not showing in listbox box
Categories
(Core :: Layout: Form Controls, defect, P2)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dmead001, Assigned: bzbarsky)
References
()
Details
Attachments
(2 files)
2.84 KB,
text/html
|
Details | |
2.89 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.0.04506.648)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.0.04506.648)
Combo box does not scroll to selected item to make it visible. It works as expected for short lists but ALWAYS fails when selected item is > 128th. This also fails to work in SeaMonkey but works as expected in IE7 * 8, Opera, and Safari. Selected item causes a page reload which knows selection as expected but does not scroll properly to it in combo box. If selected item is greater than displayed items but less that 128th a refresh will cause it to display properly.
Reproducible: Always
Steps to Reproduce:
1. Select item near end of list to fail
2. select item near beginning of list to succeed
3.
Actual Results:
if I scroll to the end of the list the correct item is selected.
Expected Results:
The combo box should scroll to make selected item visible.
This can be reproduced in Firefox 3.0 or 3.5 in XP, Vista, and Windows 7. It also does not work as expected in SeaMonkey - current version. It is an irritation that causes peope to use alternate browsers. It worked in Firefox 2.
![]() |
||
Comment 1•16 years ago
|
||
Can you give more detailed Steps to reproduce? All selectboxes seem to work normally.
Version: unspecified → 3.5 Branch
![]() |
Reporter | |
Comment 2•16 years ago
|
||
Sorry! The select box in question using the link above is the left hand 'Coin List' box. It is the only box on that page that has enough items to trigger the problem. It will appear on with any selection in the first 2 boxes as long as the result has more rows than can display without scrolling.
Comment 3•16 years ago
|
||
I can reproduce with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090726 Minefield/3.6a1pre ID:20090726044003
STR:
1. go to URL
2. select coin group: pennies
3. select coin type: Lincoln
4. In 'Coin List', select any item below '1959 D'
I'm guessing at the component here.
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: 3.5 Branch → Trunk
![]() |
Assignee | |
Comment 5•16 years ago
|
||
So... using steps from comment 3, I can't reproduce the problem, at least on Mac. Whatever item I click, that ends up at the bottom of the listbox.
Summary: selected item not showing in combo box → selected item not showing in listbox box
![]() |
Reporter | |
Comment 6•16 years ago
|
||
My comment above that it worked in Firefox 2 may not have been accurate and should be "used to work in Firefox". For clarity: if selected item is currently in viewport for listbox it works as expected; if selected item is not in the number of items displayed in the viewport but is less than item #128 it usually is not visible but will become visible at the bottom of the viewport when page is refreshed; when selected item is #129 or above even refresh does not cause it to display. This page was an easy one to show the non-function however I have several websites where long selections must be made and none display correctly. Other non-mozilla browsers work correctly so the bug must be here. I can't recommend my users use IE due to security and rendering problems. It appears this bug has existed for a long time and must be fixable as it works in other browsers.
![]() |
Assignee | |
Comment 7•16 years ago
|
||
> when selected item is #129 or above even refresh does not cause it to display.
I'm confused. How exactly do you select an item at #129 or above? Are the steps in comment 3 correct (with step 4 being to scroll down and then click one of the relevant items)? If not, what exact steps are you using?
![]() |
Assignee | |
Comment 8•16 years ago
|
||
And to be even more clear, I can't exactly fix a bug that I can't even reproduce.... ;)
![]() |
Reporter | |
Comment 9•16 years ago
|
||
OK sorry if I wasn't specific enough-I will try again. My test machine is using Windows XP SP3 (although I have verified this on other machines running Windows Vista SP1, and Windows 7 RC.
Steps:
1. go to :http://www.lilbytesoftstuff.com/coins/coins.php
2. In list box "Select Coin Group" select 'Quarters'
3. In list box "Select Coin Type" select 'Washington'
4. In list box "Coin List" Try the following:
a. Select any item visible in viewport. The page will refresh with that information and should work correctly.
b. Scroll down in the list box to a nearby item not currently in the viewport and select it. The page should refresh as expected.
c. Repeat by scrolling the viewport and selecting an item near the end of the list. No selected item will appear in the viewport, however, if you scroll to the bottom the item will be selected as expected. The page when it refreshes shows the correct item always in the other fields. I selected 2009 S in my latest test.
It does seem to work occasionally farther down the list when working down the listbox and selecting items near the last one selected. It seems more likely to fail when there is a large jump between selections.
I have other web pages that demonstrate the same behavior but most of the pages showing it require log in to see and belong to clients.
![]() |
Reporter | |
Comment 10•16 years ago
|
||
I'm really trying to be helpful here. My Linux machine is currently not available and I do not have access to a mac to see if this behavior is displayed on those systems so it might work correctly in those versions.
![]() |
Assignee | |
Comment 11•16 years ago
|
||
David, I appreciate that; I'm sorry if you felt I was accusing you of anything.
Thank you for the clear steps to reproduce!
With those steps (comment 9), I still couldn't reproduce in my Mac trunk build (which was what I'd been testing based on comment 3). I then went back to my Mac Firefox 3.5.1 build, and there I _can_ reproduce using those steps.
Let me figure out when the behavior changed.
Arie, are you sure about the build id you tested?
![]() |
Assignee | |
Comment 12•16 years ago
|
||
Hmm, weird. With the nightlies on clean profiles I can reproduce up to today's nightly....
Mats, any idea what's up here? You've looked at this sort of thing before, as I recall.
Martijn, do you think you can minimize the testcase?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: DUPEME
Comment 13•16 years ago
|
||
Both listboxes should be scrolled down. The first one doesn't do that, apparently, because of the document.body.offsetHeight call.
![]() |
Assignee | |
Comment 14•16 years ago
|
||
Martijn, thanks for the testcase!
So the issue is that we don't set the "scroll to the selected option" boolean if we're not done adding options yet. That seems bogus to me. This patch just fixes that.
Updated•16 years ago
|
Flags: wanted1.9.2?
Comment 15•16 years ago
|
||
Comment on attachment 392803 [details] [diff] [review]
Proposed fix
Looks good, but it doesn't appear to fix it completely.
In my Linux debug build, it does scroll the left list to
the end but the right list is scrolled one item to short,
i.e. I see items 30-49. It occurs both with and without
the patch about 50% of the time.
Attachment #392803 -
Flags: review?(matspal) → review+
Comment 16•16 years ago
|
||
Comment on attachment 392803 [details] [diff] [review]
Proposed fix
The should probably be r- in fact since the testcase will
make Tinderbox orange intermittently.
Attachment #392803 -
Flags: review+ → review-
Comment 17•16 years ago
|
||
I tested bug 252158 with this patch, but it didn't seem to help.
I still think that bug could be the same underlying problem.
![]() |
Assignee | |
Comment 18•16 years ago
|
||
Mats, which right list are we talking about in comment 15? Did you actually have a situation in which the reftest failed (per comment 16)?
Comment 19•16 years ago
|
||
Comment on attachment 392803 [details] [diff] [review]
Proposed fix
Boris, I was looking at Martijn's testcase and I didn't notice that your
reftest was different, sorry. I'm changing this back to r+ then.
Updated•16 years ago
|
Attachment #392803 -
Flags: review- → review+
Comment 20•16 years ago
|
||
FWIW, the remaining problem in the attached testcase seems to occur more often
if you move the mouse back and forth over the lists while Shift-reloading.
(I'm on Linux if it matters)
![]() |
Assignee | |
Comment 21•16 years ago
|
||
Hmm. Might be an ireflow issue, then?
![]() |
Assignee | |
Comment 22•16 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/9ee34b4990e5
Fix will ship in the version after Firefox 3.6.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment 23•16 years ago
|
||
(In reply to comment #21)
> Hmm. Might be an ireflow issue, then?
It appears so. I did a quick check with 2009-04-19-05-mozilla-central (works)
and 2009-05-06-05-mozilla-central (fails). (both x86-64 Linux builds)
![]() |
Assignee | |
Comment 24•16 years ago
|
||
Almost certainly due to interrupting partway though the list on the reflow when we do the scroll or some such...
Comment 25•16 years ago
|
||
I filed bug 512410 for the remaining problem.
Flags: wanted1.9.2? → blocking1.9.2+
Priority: -- → P2
![]() |
Assignee | |
Comment 26•16 years ago
|
||
I'm not convinced we should block on this. This code is fragile, undertested, and we've had this bug since at least 1.8, right?
ok
Flags: blocking1.9.2+ → blocking1.9.2?
Flags: blocking1.9.2? → wanted1.9.2+
You need to log in
before you can comment on or make changes to this bug.
Description
•