Bug Tracker

Opened 11 years ago

Closed 10 years ago

#11735 closed feature (duplicate)

Remove the .attr("value") attrHook

Reported by: dmethvin Owned by: Timmy Willison
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").

Change History (10)

comment:1 Changed 11 years ago by dmethvin

Component: unfiledattributes
Milestone: None1.8
Priority: undecidedlow
Status: newopen

comment:2 Changed 11 years ago by dmethvin

#11535 is a duplicate of this ticket.

comment:3 Changed 11 years ago by dmethvin

#9830 is a duplicate of this ticket.

comment:4 Changed 11 years ago by Timmy Willison

Owner: set to Timmy Willison
Status: openassigned

comment:5 Changed 11 years ago by Timmy Willison

#11355 is a duplicate of this ticket.

comment:6 Changed 11 years ago by Timmy Willison

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.

comment:7 Changed 11 years ago by dmethvin

Type: enhancementfeature

Bulk change from enhancement to feature.

comment:8 Changed 10 years ago by gibson042

Priority: lowblocker

comment:9 Changed 10 years ago by dmethvin

This hook should be moved to the compat plugin.

comment:10 Changed 10 years ago by gibson042

Resolution: duplicate
Status: assignedclosed

Duplicate of #12600.

Note: See TracTickets for help on using tickets.