Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7113 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: de
Blocked by: Blocking:


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.

Change History (2)

comment:1 Changed 12 years ago by Vic D'Elfant

Duplicate of #7114, apologies.

comment:2 Changed 12 years ago by snover

Resolution: duplicate
Status: newclosed

Duplicate of #6692.

Note: See TracTickets for help on using tickets.