This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Incorrect event.stopPropogation() behavior #3564
Closed
Description
In DOM event.stopPropogation will prevent event from bubbling upward, but if multiple event handlers assigned to the same Node it will execute them all. In Angular, $emit method executes event handler until very first event.stopPropogation() is called and then stops execution of all other handlers residing on the same scope. I believe that $emit method should go through every handler of it's own scope and stop propagation only for $parent scope further up.
This is an easy one-line change in $rootScope.js all you need to do is move the line that checks for stopPropogation to the end of the do loop where scope is changed to sope.$parent.