Side navigation
#7113 closed bug (duplicate)
Opened October 04, 2010 11:45AM UTC
Closed October 04, 2010 08:44PM UTC
$(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: |
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.
Duplicate of #7114, apologies.