aboutsummaryrefslogtreecommitdiffstats
path: root/vimiumFrontend.js
diff options
context:
space:
mode:
authorJohannes Emerich2010-04-17 17:39:16 +0800
committerIlya2010-04-19 10:02:59 +0800
commit159fff8933ae4c849fb03883a3304bff200b954a (patch)
tree6a5e2fbcda7dcebba18edb1c2a8e865e56765668 /vimiumFrontend.js
parent1d460c287d586582e8aeca7960edd7086b4c76ee (diff)
downloadvimium-159fff8933ae4c849fb03883a3304bff200b954a.tar.bz2
Skip default action in hideHelpDialog. Fixes #126.
Return values of event handlers added with addEventListener are ignored, so returning `false` doesn't help. Instead preventDefault has to be called on the event that is passed on to the handler.
Diffstat (limited to 'vimiumFrontend.js')
-rw-r--r--vimiumFrontend.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index f59005fa..a9c8024c 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -470,11 +470,12 @@ function showHelpDialog(html) {
Math.max((window.innerHeight - dialog.clientHeight * zoomFactor) / 2.0, 20) / zoomFactor + "px";
}
-function hideHelpDialog() {
+function hideHelpDialog(clickEvent) {
isShowingHelpDialog = false;
var helpDialog = document.getElementById("vimiumHelpDialogContainer");
if (helpDialog)
helpDialog.parentNode.removeChild(helpDialog);
+ clickEvent.preventDefault();
}
/*