dciccale/kimbo.js

'selector' parameter in delegate event setup only works for tags

Closed this issue · 3 comments

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.

Could you provide some code? a jsfiddle or just in the comments, thanks.

Fixed in the latest version