Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14509 closed defect (fixed)

delegation for mouse.enter on <tr> doesn't work

Reported by: bill Owned by: Kris Zyp
Priority: high Milestone: 1.8
Component: Events Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


Got stuck on #7111 because I couldn't use event delegation to catch mouse.enter and mouse.exit events on MenuItems, which are <tr> nodes:

on(dom.byId("tbody"), on.selector("tr", mouse.enter), function(evt){
	console.log("mouse enter delegated", evt);

Delegation was fixed in general in #13849, but this is still broken. Connecting directly to the <tr> node works:

	on(tr, mouse.enter, function(){
		console.log("mouse enter on TR itself");

See attached test case.

Attachments (1)

tr.html (1.0 KB) - added by bill 10 years ago.
test case, put in dojo/tests

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by bill

Attachment: tr.html added

test case, put in dojo/tests

comment:1 Changed 10 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [27489]:

Rework mouse.enter/mouse.leave to work properly with selectors by using the selector itself to compare the exit and entry nodes for filtering the event, fixes #14509 !strict

comment:2 Changed 10 years ago by Kris Zyp

Should I check in your tr.html and selector.html test files (even though they aren't automated)?

comment:3 Changed 10 years ago by bill

Milestone: tbd1.8

Hi Kris, I figured for dojo core you would use on.emit() to test behavior like this? Or on.emit() won't reproduce the error?

comment:4 Changed 10 years ago by Kris Zyp

In [27495]:

Add mouseenter test, refs #14509 !strict

Note: See TracTickets for help on using tickets.