Side navigation
#11735 closed feature (duplicate)
Opened May 08, 2012 07:57PM UTC
Closed December 09, 2012 12:09AM UTC
Remove the .attr("value") attrHook
Reported by: | dmethvin | Owned by: | timmywil |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9 |
Component: | attributes | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This hook was deprecated in 1.7 and can be removed in 1.8.
To get or set the **dynamic, possibly-user-changed** value, use .prop("value")
or (preferred) .val()
.
Once this is landed: To get the **value attribute** on the HTML element, use .attr("value")
.
Attachments (0)
Change History (10)
Changed May 08, 2012 07:57PM UTC by comment:1
component: | unfiled → attributes |
---|---|
milestone: | None → 1.8 |
priority: | undecided → low |
status: | new → open |
Changed June 04, 2012 05:32PM UTC by comment:4
owner: | → timmywil |
---|---|
status: | open → assigned |
Changed June 19, 2012 02:31PM UTC by comment:6
milestone: | 1.8 → 1.9 |
---|
Looking into this more, the value attribute is very fleeting in IE6/7. These browsers try very hard not to give you the attribute rather than the property, even when using attribute nodes. Internally, I'd guess it has something to do with the value attribute corresponding to the defaultValue property rather than the value property (which I also tried but it was worse). The main problem is that if the value attribute is set on pageload, the specified property for value attribute nodes works fine. However, if it has not been set and is set with js, the specified property will continue to be false and be unreliable. This has happened with other attributes and we've simply checked for empty string to see if we should return a value. This solution won't work for value since value=""
is not at all uncommon to see on option elements. I don't think we'll have a clean solution before the beta so moving to 1.9.
Changed September 09, 2012 01:10AM UTC by comment:7
type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
Changed December 03, 2012 06:37PM UTC by comment:8
priority: | low → blocker |
---|
Changed December 04, 2012 03:05AM UTC by comment:9
This hook should be moved to the compat plugin.
Changed December 09, 2012 12:09AM UTC by comment:10
resolution: | → duplicate |
---|---|
status: | assigned → closed |
Duplicate of #12600.