Opened 11 years ago
Closed 11 years ago
#10026 closed bug (wontfix)
removeData does not work with html5 data attributes
Reported by: | anonymous | Owned by: | Rick Waldron |
---|---|---|---|
Priority: | blocker | Milestone: | 1.7 |
Component: | data | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
removeData does not work with html5 data attributes
Example: http://jsfiddle.net/mm3nK/
Change History (15)
comment:1 Changed 11 years ago by
Component: | unfiled → data |
---|---|
Milestone: | None → 1.6.3 |
Owner: | set to Rick Waldron |
Priority: | undecided → blocker |
Status: | new → assigned |
comment:2 Changed 11 years ago by
comment:5 follow-up: 6 Changed 11 years ago by
Possibly related issue?
// Assign new data... $('div').data('test', 42); // Select div by data doesn't work: $('*[data-test=42]') === []
comment:6 Changed 11 years ago by
Replying to Kruncher:
Nope, as documented the $().data()
API never SETS data attributes. It only reads them, once, the first time you ask for them.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Landing pull request 461. Adds a due diligence check for pre-defined data-* attrs during removal. Fixes #10026.
More Details:
comment:8 Changed 11 years ago by
PLEASE read my comment before merging this pull request http://bugs.jquery.com/ticket/10113#comment:2
comment:9 Changed 11 years ago by
Revert "Landing pull request 461. Adds a due diligence check for pre-defined data-* attrs during removal. Fixes #10026."
This reverts commit 6805fc2cd20e36af5c1b0c51f6f39f21cea4609a.
A more cache-friendly solution is in the works.
Changeset: 84f29084d6ac8077ce5dcb4dd94d43aaeed18fb0
comment:10 Changed 11 years ago by
Blocked by: | 10113 added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
comment:11 Changed 11 years ago by
Status: | reopened → open |
---|
comment:12 Changed 11 years ago by
Milestone: | 1.6.3 → 1.7 |
---|
comment:13 Changed 11 years ago by
Status: | open → assigned |
---|
comment:14 Changed 11 years ago by
Blocked by: | 10113 removed |
---|
comment:14 Changed 11 years ago by
Blocked by: | 10027 removed |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
We will not be directly writing to data-* attrs with the jQuery data api
Further reduced test case http://jsfiddle.net/rwaldron/w3S3w/
Pull request:
https://github.com/jquery/jquery/pull/461