aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/rootScope.js
diff options
context:
space:
mode:
authorPete Bacon Darwin2013-10-05 22:45:43 +0100
committerPete Bacon Darwin2013-10-05 22:45:43 +0100
commit47f7bd706efc5f2944d182e46c1b1d324298ff36 (patch)
tree66c199b3d5769b0cfb3457702310ec9f8883d552 /src/ng/rootScope.js
parent9089468092ba1c38ee1468871b723cab39e84c21 (diff)
downloadangular.js-47f7bd706efc5f2944d182e46c1b1d324298ff36.tar.bz2
fix(rootScope): make stopPropagation only stop its own event
All sibling event handlers residing on the same scope to were stopped if one of them called stopPropagation. Closes #4204
Diffstat (limited to 'src/ng/rootScope.js')
-rw-r--r--src/ng/rootScope.js4
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);