Skip to main content

Bug Tracker

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

component: unfiledattributes
milestone: None1.8
priority: undecidedlow
status: newopen

Changed May 18, 2012 02:03AM UTC by dmethvin comment:2

#11535 is a duplicate of this ticket.

Changed May 18, 2012 02:05AM UTC by dmethvin comment:3

#9830 is a duplicate of this ticket.

Changed June 04, 2012 05:32PM UTC by timmywil comment:4

owner: → timmywil
status: openassigned

Changed June 19, 2012 06:38AM UTC by timmywil comment:5

#11355 is a duplicate of this ticket.

Changed June 19, 2012 02:31PM UTC by timmywil comment:6

milestone: 1.81.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 dmethvin comment:7

type: enhancementfeature

Bulk change from enhancement to feature.

Changed December 03, 2012 06:37PM UTC by gibson042 comment:8

priority: lowblocker

Changed December 04, 2012 03:05AM UTC by dmethvin comment:9

This hook should be moved to the compat plugin.

Changed December 09, 2012 12:09AM UTC by gibson042 comment:10

resolution: → duplicate
status: assignedclosed

Duplicate of #12600.