[Webkit-unassigned] [Bug 67233] New: Setting value on a select element to a non existing option value should clear selection
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 30 14:37:28 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67233
Summary: Setting value on a select element to a non existing
option value should clear selection
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
URL: http://www.whatwg.org/specs/web-apps/current-work/#dom
-select-value
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: Forms
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: arv at chromium.org
CC: rafaelw at chromium.org
Given:
<select>
<option value="a">A</option>
<option value="b">B</option>
</select>
<script>
var sel = document.querySelector('select');
sel.value = 'x'
assert(sel.selectedIndex === -1)
</script>
The spec says: "On setting, the value attribute must set the selectedness of all the option elements in the list of options to false, and then the first option element in the list of options, in tree order, whose value is equal to the given new value, if any, must have its selectedness set to true."
This means that we should unselect all and then select first option that matches the value.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list