All users were logged out of Bugzilla on October 13th, 2018
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 If a listbox (select) is placed within a table where the cell (<td>) has the attribute align="center", the listbox does not initially show the selected line. html code to reproduce behavior: <html> <head><title>Listbox Problem</title> </head> <body><form><table> <tr> <td align="center"> <select id="day" name="day" tabindex="1" size="7"> <option value="20.09.2003">Sa 20.09.2003</option> <option value="21.09.2003">So 21.09.2003</option> <option value="22.09.2003">Mo 22.09.2003</option> <option value="23.09.2003">Di 23.09.2003</option> <option value="24.09.2003">Mi 24.09.2003</option> <option value="25.09.2003">Do 25.09.2003</option> <option value="26.09.2003">Fr 26.09.2003</option> <option value="27.09.2003">Sa 27.09.2003</option> <option value="28.09.2003">So 28.09.2003</option> <option value="29.09.2003">Mo 29.09.2003</option> <option value="30.09.2003">Di 30.09.2003</option> <option value="01.10.2003">Mi 01.10.2003</option> <option value="02.10.2003">Do 02.10.2003</option> <option value="03.10.2003" selected >Fr 03.10.2003</option> <option value="04.10.2003">Sa 04.10.2003</option> <option value="05.10.2003">So 05.10.2003</option> <option value="06.10.2003">Mo 06.10.2003</option> </select> </table></form></body> </html> Reproducible: Always Steps to Reproduce: 1. Save above code into a html document 2. open this document Actual Results: listbox shows first line Expected Results: listbox should scroll to the selected line
Why do we ever scroll to the <option selected>? That seems like odd behavior to me...
are you serious? %) matthias
Yes, I am. Perhaps I should clarify the question... "I just looked through the listbox code, and I fail to see what would trigger this scrolling. What code actually triggers it?"
Adding me to the CC list. I have just noticed this bug when testing a PHP script. I have found out that IE behaviour is exactly the requested on this bug: if an item is selected by default, the select element should be scrolled to allow seeing the item selected. I suggest to change the status to NEW. Oh, and it is important to keep in mind that the attribute "align=center" in the TD tag is not necessary for reproducing the bug.
I had a mistake in my comment #4. The align="center" is a requisite for the reproduction of the bug. The best way to notice the bug is displaying the HTML example that gave Matthias. If the attribute align="center" is removed, Mozilla scrolls the SELECT (BTW, I am answering to Boris, I think).
confirmed with trunk build 20040111908 I can't see why a list should behave differently with and without align="center" on the cell, it's not consistent.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Bug still occurs, 2004-07-18-05 trunk Linux. The regression occured somewhere between Mozilla 1.3 and 1.4 releases.
Severity: minor → normal
OS: Windows XP → All
Attachment #154028 - Attachment mime type: application/octet-stream → video/mpeg
However this can be made to work by a work-around by replacing the innerHTML of the select statement as follows - <select> <option value="Page1"> <option value="Page2"> <option value="Page3"> <option value="Page4"> <select> If option 3 needs to be as selected then using innerHTML replace the option 3 html text as: <option value="Page3" selected="selected"> So it now looks like - <select> <option value="Page1"> <option value="Page2"> <option value="Page3" selected="selected"> <option value="Page4"> <select> This way I am able to set the option as selected.
Assignee: layout.form-controls → nobody
QA Contact: ian → layout.form-controls
Works for me, both when loading the test attachment directly from Bugzilla and from a local saved file. Nightly 37.0a1 (2015-01-01) on Linux64. Can anyone else reproduce the problem?
Whiteboard: [closeme 2015-01-26]
Resolved per whiteboard and Comment 13
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
Whiteboard: [closeme 2015-01-26]
You need to log in before you can comment on or make changes to this bug.