Basically, calling stopPropagation on a bubble phase listeners should prevent other delegated listeners further up the DOM from being called, but it doesn't.
Furthermore, listeners added with addEventListener are still called because the actual call to stopPropagation happens at the level of the root element, stopping propagation above it, but not above the child element where the user called stopPropagation at, see this Fiddle for an example. This is non-trivial to solve, so it should at least be documented. Note that jQuery exhibits the same behavior (but does correctly stop propagation to other listeners added further up the DOM).
Basically, calling
stopPropagation
on a bubble phase listeners should prevent other delegated listeners further up the DOM from being called, but it doesn't.See this Fiddle here for an example with bubble phase listeners for and this Fiddle for an example with capture phase listeners.
Furthermore, listeners added with
addEventListener
are still called because the actual call tostopPropagation
happens at the level of the root element, stopping propagation above it, but not above the child element where the user calledstopPropagation
at, see this Fiddle for an example. This is non-trivial to solve, so it should at least be documented. Note that jQuery exhibits the same behavior (but does correctly stop propagation to other listeners added further up the DOM).