RESOLVED FIXED 9095
regression: can't select by setting option.selected to true
https://bugs.webkit.org/show_bug.cgi?id=9095
Summary regression: can't select by setting option.selected to true
David Phillip Oster
Reported 2006-05-24 12:38:51 PDT
In a select element, in previous versions of webKit, you could select an element by settings its option[n].selected = true; This no longer works. In shipping Safari and recent webkits, the following HTML sets the select element to 'good'. As of nightly build 14464, it sets it to 'bad'. Minimal example: <html> <head> <script> function GoLoad(){ var sel = document.getElementById('sel'); sel.options[2].selected = true; } </script> <title>Select by option.select = true</title> </head> <body onLoad='javascript:GoLoad()'> <h1>experiment: Select by setting the option's selected propert to true</h1> <form> <select name='sel' id='sel'> <option value='bad'>bad</option> <option value='once'>once</option> <option value='good'>good</option> <option value='thrice'>thrice</option> </select> </form> <div id='log'> </div> <div id='comment'> </div> </body> </html>
Attachments
Fix (5.06 KB, patch)
2006-05-24 16:06 PDT, Geoffrey Garen
ggaren: review+
Geoffrey Garen
Comment 1 2006-05-24 16:06:27 PDT
Created attachment 8525 [details] Fix Anders reviewed this.
Geoffrey Garen
Comment 2 2006-05-24 16:09:15 PDT
Committed revision 14574.
Note You need to log in before you can comment on or make changes to this bug.