Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8701 closed bug (wontfix)

Native events are not triggered at all (chrome/firefox4)

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: event Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


Example: http://jsfiddle.net/7suaH/

Tested in chrome/FF4 but I think it always applies. Tested with older jQuery versions as well.

The following API doc implies native events are triggered (and bubbled):


But appears not to be the case.

Seems like DOM event mechanism is circumvented when triggering events, which is ok if you use just jQuery, but when trying to mashup or when authoring lib agnostic toolkits it becomes problematic to say the least. Would be nice if jQuery would share it's events with other kids ;)

Change History (3)

comment:1 Changed 12 years ago by [email protected]

After some further investigation, it seems that when .onclick property is directly set (no shim used), the event does fire, but listeners set by native addEventListener do not catch the event at all.

see: http://jsfiddle.net/7suaH/1/

comment:2 Changed 12 years ago by dmethvin

Component: unfiledevent
Keywords: needsdocs added
Resolution: wontfix
Status: newclosed

It's pretty difficult to meld two event models like that. For us to use the native model would require changes to jQuery's behavior that would break a lot of code.

comment:3 Changed 12 years ago by dmethvin

Keywords: needsdocs removed

Docs currently seem clear:

Any event handlers attached with .bind() or one of its shortcut methods are triggered when the corresponding event occurs. They can be fired manually, however, with the .trigger() method. -- http://api.jquery.com/trigger/

Note: See TracTickets for help on using tickets.