toHandle doesn't support delegated .on() syntax #145

nzifnab opened this Issue Sep 9, 2013 · 4 comments


None yet
5 participants

nzifnab commented Sep 9, 2013

As the title suggests, when you bind an event using this syntax:

$('.my-parent-element').on('click', '.child-element', function(e){
  // Do cool things

This doesn't work:


But this does:


Event though it's not actually clicking that parent element that causes the function to run. I would almost expect some kind of method like


or something. I saw this: #40 but it was written for deprecated delegation syntax and closed quite some time ago. Is there a matcher I can use to work-around this issue and test that the child element has the handler on it? I'm not sure if it's a bug that toHandle fails on the child selector, but if it is I can produce a test case if needed.


agreco commented Nov 19, 2013

is this issue being considered?


👍 What's the status on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment