Skip to main content

Bug Tracker

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 timmywil comment:1

component: unfiledattributes
priority: undecidedlow
resolution: → invalid
status: newclosed

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.