Ticket #11558 (closed bug: invalid)
Invoking $.data("name", undefined) does not remove data as documented
|Reported by:||dcitron||Owned by:||rwaldron|
The documentation for removeData says:
When using .removeData("name"), jQuery will attempt to locate a data- attribute on the element if no property by that name is in the internal data cache. To avoid a re-query of the data- attribute, set the name to a value of either null or undefined (e.g. .data("name", undefined)) rather than using .removeData().
However, "$data("name", undefined)" does not actually remove the stored data as documented.
In 1.7.1, passing undefined as the second argument would break the chain, which was fixed via #5571.
In 1.7.2 and edge, the chain is no longer broken, but the data is still not removed: http://jsfiddle.net/AvqeW/2/
- Owner set to rwaldron
- Priority changed from undecided to high
- Status changed from new to assigned
- Component changed from unfiled to data
- Milestone changed from None to 1.next
- Keywords needsdocs added
- Status changed from assigned to closed
- Resolution set to invalid