Skip to main content

Bug Tracker

Side navigation

#1278 closed bug (fixed)

Opened June 07, 2007 02:57PM UTC

Closed June 21, 2007 07:23PM UTC

Triggering unhandled event causes js error

Reported by: dmethvin Owned by:
Priority: major Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:
Description

If there is an element #test that has no event handlers, then $("#test").trigger("anything here") causes an error because element.$handle isn't yet defined.

This fixed the problem for me:

http://dev.jquery.com/browser/trunk/jquery/src/event/event.js#L151

< if ( (val = element.$handle.apply( element, data )) !== false )

> if ( jQuery.isFunction(element.$handle) && (val = element.$handle.apply( element, data )) !== false )
Attachments (1)
  • scratch.htm (0.5 KB) - added by dmethvin June 07, 2007 02:57PM UTC.

    test case

Change History (1)

Changed June 21, 2007 07:23PM UTC by brandon comment:1

resolution: → fixed
status: newclosed

Fixed in Rev [2136].