Bug Tracker

Opened 8 years ago

Closed 8 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 8 years ago by Rick Waldron

Component: unfileddata
Milestone: None1.6.3
Owner: set to Rick Waldron
Priority: undecidedblocker
Status: newassigned

comment:2 Changed 8 years ago by Rick Waldron

comment:3 Changed 8 years ago by dmethvin

Blocked by: 10027 added

See discussion in #10027 though.

comment:4 Changed 8 years ago by dmethvin

#10095 is a duplicate of this ticket.

comment:5 Changed 8 years 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 8 years 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 8 years ago by Rick Waldron

Resolution: fixed
Status: assignedclosed

Landing pull request 461. Adds a due diligence check for pre-defined data-* attrs during removal. Fixes #10026.

More Details:

comment:8 Changed 8 years ago by cowboy

PLEASE read my comment before merging this pull request http://bugs.jquery.com/ticket/10113#comment:2

comment:9 Changed 8 years 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 8 years ago by timmywil

Blocked by: 10113 added
Resolution: fixed
Status: closedreopened

comment:11 Changed 8 years ago by timmywil

Status: reopenedopen

comment:12 Changed 8 years ago by Rick Waldron

Milestone: 1.6.31.7

comment:13 Changed 8 years ago by Rick Waldron

Status: openassigned

comment:14 Changed 8 years ago by Rick Waldron

Blocked by: 10113 removed

comment:14 Changed 8 years ago by Rick Waldron

Blocked by: 10027 removed
Resolution: wontfix
Status: assignedclosed

We will not be directly writing to data-* attrs with the jQuery data api

Note: See TracTickets for help on using tickets.