Opened 10 years ago

Last modified 10 years ago

#13885 closed defect

dojo/on - cancelling events and firing order — at Version 1

Reported by: James Thomas Owned by:
Priority: high Milestone: tbd
Component: Core Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by James Thomas)

I've encountered some features of dojo/on that might be bugs but need verifying if this is expected behaviour.

  1. Cancelling events using dojo.stopEvent doesn't work. In test_case_1.html, I've attached two event handlers and the first one fired calls dojo.stopEvent. However, the second event is still fired.
  1. Attachment order of events dictates order they are fired in. In test_case_2.html, the parent element event handler is fired before the child element's. If I swap round the attachment ordering, I see the reverse. The behaviour seen with dojo.connect would result in the child event handler firing first, regardless of the attachment order.
  1. Using event delegation assumes "dojo/query" available. I hit a problem recently trying to use event delegation when I hadn't externally required the dojo/query module. Can this be documented somewhere?

This was tested against 1.7.0b5 using Chrome on Mac OS X.

Change History (3)

Changed 10 years ago by James Thomas

Attachment: test_case_1.html added

Changed 10 years ago by James Thomas

Attachment: test_case_2.html added

comment:1 Changed 10 years ago by James Thomas

Description: modified (diff)
Note: See TracTickets for help on using tickets.