Skip to main content

Bug Tracker

Side navigation

#10026 closed bug (wontfix)

Opened August 11, 2011 03:06PM UTC

Closed September 22, 2011 03:36AM UTC

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:
Blocked by: Blocking:
Description

removeData does not work with html5 data attributes

Example:

http://jsfiddle.net/mm3nK/

Attachments (0)
Change History (15)

Changed August 11, 2011 04:48PM UTC by rwaldron comment:1

component: unfileddata
milestone: None1.6.3
owner: → rwaldron
priority: undecidedblocker
status: newassigned

Changed August 11, 2011 05:18PM UTC by rwaldron comment:2

Changed August 11, 2011 06:34PM UTC by dmethvin comment:3

blockedby: → 10027

See discussion in #10027 though.

Changed August 19, 2011 12:52PM UTC by dmethvin comment:4

#10095 is a duplicate of this ticket.

Changed August 20, 2011 02:49AM UTC by Kruncher comment:5

Possibly related issue?

// Assign new data...
$('div').data('test', 42);

// Select div by data doesn't work:
$('*[data-test=42]') === []

Changed August 22, 2011 05:50PM UTC by dmethvin comment:6

Replying to [comment:5 Kruncher]:

Nope, as documented the $().data() API never SETS data attributes. It only reads them, once, the first time you ask for them.

Changed August 22, 2011 05:50PM UTC by Rick Waldron comment:7

resolution: → fixed
status: assignedclosed

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

More Details:

Changeset: 6805fc2cd20e36af5c1b0c51f6f39f21cea4609a

Changed August 22, 2011 06:22PM UTC by cowboy comment:8

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

Changed August 22, 2011 07:03PM UTC by timmywil comment:9

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

Changed August 22, 2011 07:04PM UTC by timmywil comment:10

blockedby: 1002710027, 10113
resolution: fixed
status: closedreopened

Changed August 22, 2011 07:04PM UTC by timmywil comment:11

status: reopenedopen

Changed August 25, 2011 06:04PM UTC by rwaldron comment:12

milestone: 1.6.31.7

Changed August 25, 2011 06:04PM UTC by rwaldron comment:13

status: openassigned

Changed September 22, 2011 03:35AM UTC by rwaldron comment:14

blockedby: 10027, 1011310027

Changed September 22, 2011 03:36AM UTC by rwaldron comment:15

blockedby: 10027
resolution: → wontfix
status: assignedclosed

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