summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2015-11-01 10:37:45 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2015-11-01 10:37:45 +0100
commit107907bdd6b9df4d4e7ec4bb3e55875174877f3b (patch)
tree9be70eaf8ee502a326d37c55fe6ad78c5973c74e /src/core
parent36a80278827e78c3534f7cceb5115af1f6410bb8 (diff)
downloadlibdom-107907bdd6b9df4d4e7ec4bb3e55875174877f3b.tar.gz
libdom-107907bdd6b9df4d4e7ec4bb3e55875174877f3b.tar.bz2
Ensure we don't capture or bubble on target
Diffstat (limited to 'src/core')
-rw-r--r--src/core/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/node.c b/src/core/node.c
index 2cc08d2..e0c686f 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -2412,7 +2412,7 @@ dom_exception _dom_node_dispatch_event(dom_event_target *et,
}
/* The capture phase */
- for (targetnr = ntargets; targetnr > 0; --targetnr) {
+ for (targetnr = ntargets; targetnr > 1; --targetnr) {
dom_node_internal *node =
(dom_node_internal *) targets[targetnr - 1];
@@ -2443,7 +2443,7 @@ dom_exception _dom_node_dispatch_event(dom_event_target *et,
/* Bubbling phase */
evt->phase = DOM_BUBBLING_PHASE;
- for (targetnr = 0; targetnr < ntargets; ++targetnr) {
+ for (targetnr = 1; targetnr < ntargets; ++targetnr) {
dom_node_internal *node =
(dom_node_internal *) targets[targetnr];
err = _dom_event_target_dispatch(targets[targetnr],