This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26535 - The selected IDL attribute should also reflect the selected HTML attribute. This would be of benefit to devtools, and just generally result in less dissonance in the DOM.
Summary: The selected IDL attribute should also reflect the selected HTML attribute. T...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-07 01:41 UTC by contributor
Modified: 2014-09-12 18:07 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2014-08-07 01:41:34 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html
Multipage: http://www.whatwg.org/C#the-option-element
Complete: http://www.whatwg.org/c#the-option-element
Referrer: 

Comment:
The selected IDL attribute should also reflect the selected HTML attribute.
This would be of benefit to devtools, and just generally result in less
dissonance in the DOM.

Posted from: 99.237.75.191
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
Comment 1 caitp 2014-08-07 01:57:20 UTC
To expand on that, it would be useful for developer tools because it's useful for the DOM to reflect the actual state of the element. The presence of the "selected" attribute seems to indicate that the element is selected, but because the attribute is reflected, this might actually be incorrect.

Also, reflecting `selected` would possibly be of some use to persons styling the control with CSS, too.
Comment 2 caitp 2014-08-07 13:53:50 UTC
The `defaultSelected` attribute is a bit of an issue, I'm not sure how many sites are using it, but if there was room for a breaking change, I'd want that to reflect a `default` attribute instead, again because of the dissonance.
Comment 3 Ian 'Hixie' Hickson 2014-08-13 18:34:58 UTC
Changing this would radically change the semantics of the API. It's highly unlikely that we can change this decade+ old API at this point.
Comment 4 caitp 2014-08-13 18:37:50 UTC
Yeah, I've seen that this probably breaks things pretty bad =( If it's ever possible to change this into a less awful state of being, I'd love for that to happen.

But I guess for the time being it's probably a non-starter :(
Comment 5 Ian 'Hixie' Hickson 2014-09-12 18:07:48 UTC
Closing per comment 4.