Closed Bug 12350 Opened 25 years ago Closed 25 years ago

selected and defaultSelected don't work

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: pollmann)

References

()

Details

(Whiteboard: Should Selected be readonly?)

DESCRIPTION:  According to the DOM1 Errata,
http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html ,
HTMLSelectElement::selected should NOT BE readonly (at least if you read into it
a little - it describes changing it) and HTMLSelectElement::defaultSelected
should reset the value of selected as well.  Right now, selected is always false
and defaultSelected can be changed, but the change has no effect.

STEPS TO REPRODUCE:
1) Load above URL
2) note that "four" is selected and "five" isn't.
3) press "test Errata" button

ACTUAL RESULTS:
 * 28th, 32d, 36th, 40th, and 42d lines of output are red
 * "four" is still selected and "five" isn't

EXPECTED RESULTS:
 * above mentioned lines of output are green
 * the options switch so "four" is not selected and "five" is

DOES NOT WORK CORRECTLY ON:
 * Linux, apprunner, 1999-08-20-13-M10
Assignee: vidur → pollmann
Another one for you, Eric. One day we'll get this right.
OS: Linux → All
Hardware: PC → All
ALSO DOES NOT WORK CORRECTLY ON:
 * Windows, apprunner, 1999-08-24-09-M10

Marking All/All
Status: NEW → ASSIGNED
Whiteboard: Should Selected be readonly?
I see two parts to this bug:
1) SelectElement::Selected is readonly.
2) Setting SelectElement::DefaultSelected does not update the widget.

1) We chose to do this as we have a fairly literal implementation of the spec.
Vidur just sent a message to the DOM group to get explicit confirmation that
this is a typo.  If it is, I will update and recompile the Option IDL file and
this should work.

2) I just checked in a fix.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Just checked in a fix for 1.

To verify, go to this page:
http://www.fas.harvard.edu/~dbaron/dom/test/one-html/Errata

Click on the 'test Errata' button.  The results box should contain all green
lines.  If any line referring to 'selected' is red, this bug was not fixed.
Status: RESOLVED → VERIFIED
Verified fixed, Linux apprunner 1999-10-08-08-M11.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.