From 159fff8933ae4c849fb03883a3304bff200b954a Mon Sep 17 00:00:00 2001 From: Johannes Emerich Date: Sat, 17 Apr 2010 17:39:16 +0800 Subject: 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. --- vimiumFrontend.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } /* -- cgit v1.2.3