Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#13762 closed defect (fixed)

dojo/on event delegation doesn't work on document

Reported by: tomc974 Owned by: Kris Zyp
Priority: high Milestone: 1.8
Component: Events Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

I tried to do event delegation with dojo/on following the documentation instructions but it doesn't work. This code

on(document, "li:click", function() { console.log(this.innerHTML) } ) ;

results in :

context.getAttribute is not a function
old = context.getAttribute( "id" ),

Changing document to dojo.body() makes it works. This is either a bug in dojo/on or a documentation error.

(trunk was used)

Change History (2)

comment:1 Changed 7 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [27531]:

Properly handle document as a root for matches() fixes #13762 !strict

comment:2 Changed 7 years ago by bill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.