| Issue 1788: | Browser: First item is ever selected in HTML select with multiple attribute | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
On Android browser the first item is ever selected in HTML select with multiple attribute. Create an HTML page with this code: <select multiple="multiple"> <option>One</option> <option>Two</option> <option>Three</option> </select> When clicking to see what elements are selected the first element is showed as selected. This bug was present and fixed in iPhone too so it could be already fixed in WebKit. |
||||||||||
,
Jan 21, 2009
This issue is assigned to an engineer for further evaluation |
|||||||||||
,
Jan 21, 2009
(No comment was entered for this change.)
Status: Reviewed
|
|||||||||||
,
Jan 21, 2009
This bug is related with the following bug: When you insert a new <option> element using JavaScript as the first element, all is correct while the script is running, the "selected" property is false as it must be. When the script ends the component is visually updated, in this moment the "selected" property is automatically changed to true. You can change the "selected" property to false again using JavaScript and it works, there is no automatic change to true in this case (the component is not visually updated but the state is correct). |
|||||||||||
,
Jan 21, 2009
New finding: When the first <option> element is removed, the next <option> becomes the new first option, in this case the "selected" property of this element is erroneously changed to true. |
|||||||||||
,
Jan 21, 2009
Correction: any option added or removed with JavaScript causes this bug, I think the problem arises when WebKit re-render the component after insertion/removing when the script ends. |
|||||||||||
,
May 28, 2009
The problem is we have a change to WebKit which turns a <select multiple="multiple"> into a menulist. I am trying to figure out how the iPhone does it without seeing this bug, the proper way, so we can merge with WebKit more cleanly. |
|||||||||||
,
May 29, 2009
Be careful with your investigations in the WebKit code related to iPhone, this problem was present and fixed in iPhone (in fact I think your initial code was got from the iPhone version of WebKit). In spite of this, the behavior of select multiple (DOM point of view) is a nightmare in iPhone, values of "selected" properties are wrong until you leave the "menu list" for selection, so be very careful when you inspect the WebKit repository. Furthermore, multiple selection using some kind of menu list is problematic in any WebKit based browser. In ItsNat I fix this problem with a timer resetting a false the conflictive option because the selected property is set to true when the select control is visually updated. I think this may help you. |
|||||||||||
,
Jun 23, 2009
This was fixed internally |
|||||||||||
,
Aug 14, 2009
(No comment was entered for this change.)
Status: FutureRelease
Owner: c...@android.com |
|||||||||||
|
|
|||||||||||