#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: | ||
Blocked by: | Blocking: |
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 (3)
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
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
comment:3 Changed 10 years ago by
Scrap that last comment, prop('disabled', false) is clever enough to remove the disabled attribute, not just set it to false
http://api.jquery.com/removeProp/