Skip to main content

Bug Tracker

Side navigation

#6676 closed bug (duplicate)

Opened June 15, 2010 06:30PM UTC

Closed August 18, 2010 03:27AM UTC

.unbind causes "elem.removeEventListener is not a function" at #2070 for non-DOM objects

Reported by: mu Owned by:
Priority: Milestone: 1.4.2
Component: event Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

If JQuery event handlers are bound to non-DOM JS objects, .unbind throws an error while unbinding the last listener. removeElement on line 2068 makes an assumption that the passed in 'elem' param is a DOM object.

The issue is NOT found in 1.3.2.

Sample test case:

<head><script src=""></script></head>

<script language="javascript">
var m = {};

$(m).bind("myevent.f1", function (){});	
$(m).bind("myevent.f2", function (){});


 The following line causes a JS Error at jquery-1.4.2.js (line 2070).

elem.removeEventListener is not a function
elem.removeEventListener( type, handle, false );   

Attachments (0)
Change History (1)

Changed August 18, 2010 03:27AM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

Dup of #6184.