Side navigation
#10038 closed bug (invalid)
Opened August 12, 2011 01:16PM UTC
Closed August 12, 2011 01:39PM UTC
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.
Attachments (0)
Change History (1)
Changed August 12, 2011 01:39PM UTC by comment:1
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.