Ticket #10026 (closed bug: wontfix)
removeData does not work with html5 data attributes
| Reported by: | anonymous | Owned by: | rwaldron |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.7 |
| Component: | data | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
removeData does not work with html5 data attributes
Example: http://jsfiddle.net/mm3nK/
Change History
comment:1 Changed 23 months ago by rwaldron
- Owner set to rwaldron
- Priority changed from undecided to blocker
- Status changed from new to assigned
- Component changed from unfiled to data
- Milestone changed from None to 1.6.3
comment:2 Changed 23 months ago by rwaldron
Further reduced test case http://jsfiddle.net/rwaldron/w3S3w/
Pull request:
comment:5 follow-up: ↓ 6 Changed 22 months ago by Kruncher
Possibly related issue?
// Assign new data...
$('div').data('test', 42);
// Select div by data doesn't work:
$('*[data-test=42]') === []
comment:6 in reply to: ↑ 5 Changed 22 months ago by dmethvin
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 22 months ago by Rick Waldron
- Status changed from assigned to closed
- Resolution set to fixed
Landing pull request 461. Adds a due diligence check for pre-defined data-* attrs during removal. Fixes #10026.
More Details:
comment:8 Changed 22 months ago by cowboy
PLEASE read my comment before merging this pull request http://bugs.jquery.com/ticket/10113#comment:2
comment:9 Changed 22 months ago by timmywil
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 22 months ago by timmywil
- Status changed from closed to reopened
- Resolution fixed deleted
- Blocked by 10113 added
comment:14 Changed 21 months ago by rwaldron
- Status changed from assigned to closed
- Resolution set to wontfix
- Blocked by 10027 removed
We will not be directly writing to data-* attrs with the jQuery data api
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
