diff options
Diffstat (limited to 'src/ng/rootScope.js')
| -rw-r--r-- | src/ng/rootScope.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 08a2eff5..48f8a07b 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -867,12 +867,14 @@ function $RootScopeProvider(){ continue; } try { + //allow all listeners attached to the current scope to run namedListeners[i].apply(null, listenerArgs); - if (stopPropagation) return event; } catch (e) { $exceptionHandler(e); } } + //if any listener on the current scope stops propagation, prevent bubbling + if (stopPropagation) return event; //traverse upwards scope = scope.$parent; } while (scope); |
