Bug Tracker

Opened 16 years ago

Closed 16 years ago

#1278 closed bug (fixed)

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:


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:


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

> if ( jQuery.isFunction(element.$handle) && (val = element.$handle.apply( element, data )) !== false )

Attachments (1)

scratch.htm (535 bytes) - added by dmethvin 16 years ago.
test case

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by dmethvin

Attachment: scratch.htm added

test case

comment:1 Changed 16 years ago by brandon

Resolution: fixed
Status: newclosed

Fixed in Rev [2136].

Note: See TracTickets for help on using tickets.