Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7114 closed bug (duplicate)

$(element).data({...}) erases events

Reported by: Vic D'Elfant Owned by:
Priority: undecided Milestone: 1.4.3
Component: data Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Description

We had a specific issue in which events which were bound to an element somehow disappeared between the actual binding and the triggering of said event.

After hours of debugging, we found out that the events were erased by a data({...}) call on the same event (so with an array of key-value pairs instead of single calls). This is obviously due to jQuery using the "events" data element for storing events. In our opinion, jQuery's data() function should leave the "events" data element intact because it is far from obvious that providing an array will override *everything*, including internal data.

Test case is attached to this ticket.

Attachments (1)

jquery-event-data-poc.htm (506 bytes) - added by Vic D'Elfant 12 years ago.
Proof of Concept

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by Vic D'Elfant

Attachment: jquery-event-data-poc.htm added

Proof of Concept

comment:1 Changed 12 years ago by john

Resolution: duplicate
Status: newclosed

Duplicate of #6692

Note: See TracTickets for help on using tickets.