Bug Tracker

Modify

Ticket #8701 (closed bug: wontfix)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: bgerrissen@… Owned by:
Priority: undecided Milestone: 1.next
Component: event Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

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):

 http://api.jquery.com/trigger/

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

comment:1 Changed 2 years ago by bgerrissen@…

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 2 years ago by dmethvin

  • Keywords needsdocs added
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to event

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 2 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/

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.