'selector' parameter in delegate event setup only works for tags
Closed this issue · 3 comments
cverond commented
Hello,
I have a situation where I would like to attach a delegate event to a container and select the delegate using a class selector, but it doesn't work.
I have tracked down the issue to the _is(target, selector, element)
function where selector is only checked against nodeName and is not performed a full selector check:
... target.nodeName.toLowerCase() === selector ...
If it could be helpful I can prepare a minimum test-case.
Thanks for your help.
dciccale commented
Could you provide some code? a jsfiddle or just in the comments, thanks.
cverond commented
Sure, here it is: http://jsfiddle.net/cverond/zTJGm/
dciccale commented
Fixed in the latest version