First, I would recommend a read of stopPropagation vs. stopImmediatePropagation. It appears stopPropagation
should work for you if you binded to its child element. See event bubbling.
However, if you binded to the same parent, it's important to note stopImmediatePropagation
won't magically skip previous events.
Event handlers are executed in the order in which they have been attached to the element.
In this scenario, I would actually recommend debugging from your browser on the events fired to see what is happening.
- Open
Dev Tools
on Chrome
- Click the
Sources
tab
- On right-hand side, scroll down to
Event Listener Breakpoints
, and expand tree
- Click on the events you want to listen for.
- Interact with the target element, if they fire you will get a break point in the debugger
Similarly, you can:
- In the
Elements
tab, select your element.
- On the right side, there should be a side-tab with
Event Listeners
.
- Expand the tree to see what events are attached to the element.