aboutsummaryrefslogtreecommitdiffstats
path: root/vimiumFrontend.js
diff options
context:
space:
mode:
authorJez Ng2012-01-19 03:07:12 +0800
committerJez Ng2012-01-19 03:13:07 +0800
commitc522ba2e6b624e0c4364034a64605d4367f06d7b (patch)
tree06e8e5da54ed1a6ea63353943cf4825e50a10d97 /vimiumFrontend.js
parent469acff29be41e60eb8e1c24f007d435711d2b50 (diff)
downloadvimium-c522ba2e6b624e0c4364034a64605d4367f06d7b.tar.bz2
bubbleEvent should manage the native event propagation.
If the handlers do not want it bubbled up the internal stack, we can safely assume that they do not want it bubbled up the native stack as well. This fixes some problems e.g. with Google search pages.
Diffstat (limited to 'vimiumFrontend.js')
-rw-r--r--vimiumFrontend.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index 6f02bb1c..283f8d08 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -401,8 +401,10 @@ function bubbleEvent(type, event) {
for (var i = handlerStack.length-1; i >= 0; i--) {
// We need to check for existence of handler because the last function call may have caused the release of
// more than one handler.
- if (handlerStack[i] && handlerStack[i][type] && !handlerStack[i][type](event))
+ if (handlerStack[i] && handlerStack[i][type] && !handlerStack[i][type](event)) {
+ suppressEvent(event);
return false;
+ }
}
return true;
}