Opened 11 years ago
Closed 11 years ago
#10038 closed bug (invalid)
attr returns undefined for disbaled on non input elements
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
As i understand it, attr should be setting and getting attribute on DOM elements, but this doesn't seem to be 100% true anymore with 1.6+. While I can set the attribute "disabled" on any element, trying to get that attribute returns undefined unless that element is a input. I would suspect this to be true of similar attributes that were changed in favor of prop. In this case, we are not trying to set an javascript property, rather a simple attribute on the element. I would think that i ought to be able to set/get any attribute regardless of name. This bug makes upgrading to 1.6 impossible for my company without MUCH pain.
Change History (1)
comment:1 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
If set to false, it will remove the disabled attribute as even when set to false. With boolean attributes, its presence is what indicates value rather than its string value. However, if there is a bug in the code, please provide a reduced test case on http://jsfiddle.net to help us assess the issue.