Ticket #10115 (closed bug: invalid)
prop('disabled') and removeProp('disabled') on select elements not working as expected.
| Reported by: | markstory | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
With jQuery 1.6.2, using prop() and removeProp() to toggle the disabled property on a select box in Chrome 14.0.835.94 beta does not work as expected.
The first toggling of disabled works as expected, but future toggling does not. This might be me confusing how these methods work. However, the equivalent code without jQuery doesn't suffer the same issue.
The same issue is not present in Safari 5.0.5 or Firefox 6.0
I've created a fiddle for the issue http://jsfiddle.net/markstory/B3NCY/
To reproduce try toggling the enabled/disabled links several times.
Change History
comment:1 Changed 21 months ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 3 months ago by anonymous
Setting "disabled" to "false" using prop does not work in some browsers (on my IE 9.0.8), since they follow a standard of if a "disabled" attribute is defined, it's equivalent to true (irrelevant of "disabled"s value). So only way to enabled it would be to remove it
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

http://api.jquery.com/removeProp/