Bug Tracker

Modify

Ticket #7209 (closed bug: fixed)

Opened 4 days ago

Last modified 3 days ago

$.fn.removeData can't delete data

Reported by: caii Owned by:
Priority: undecided Milestone: 1.4.4
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocking: Blocked by:

Description

$('body').data('a',1);

$('body').removeData();

alert($('body').data('a')) still 1

alert($.expando in document.body) still true

Is it bug or my mistake? and jQuery.support.deleteExpando does not exist in 1.4.3

Change History

comment:1 Changed 4 days ago by jitter

Bug confirmed. removeData() fails in 1.4.3 (removeData(name) still works).

It looks like the jQuery.support.deleteExpando property (and the according test in support.js) got removed by accident.

Commit where the deleteExpando property was introduced  #9195107 (improvement on the previous commit  #a6f3375)

Commit where the functionality was removed  #141ad3c

 live-test-case

Last edited 4 days ago by jitter (previous) (diff)

comment:2 Changed 4 days ago by addyosmani

#7210 is a duplicate of this ticket.

comment:3 Changed 3 days ago by John Resig

  • Status changed from new to closed
  • Resolution set to fixed

We removed deleteExpando after 1.4.2, for some reason. This caused problems with removeData() (no arguments). Fixes #7209.

Changeset: e1b940d74824282fd3466d39a8ab574da4ef6fc5

Please use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.