With a structure like this:
<div class="my-delegator">
<div class="my-button">
<span class="my-button-text">I'm a button</span>
</div>
</div>
If I attach a listener on "my-delegator", like so:
foo = document.querySelectorAll(".my-delegator")
delegator = new ftdom.Delegator(foo)
delegator.on("mouseover", ".my-button", someFunc, true)
delegator.on("mouseout", ".my-button", someFunc, true)
I get the expected mouseover/mousout events when the cursor crosses the border of "my-button". But then I also get a "mouseout" event from "my-button" when the cursor goes from inside the button padding to inside the button text and, even weirder, I get a "mouseover" event from "my-button-text".
I'd expect to only get "mousover" and "mouseout" events when the cursor crosses the border of "my-button". At the very least, the selector passed to on should filter out the "mouseover" events coming from the inner node ("my-button-text"), but I'd also prefer not to get the "mouseout" event when the cursor moves deeper into the subtree.