From 9635de33254644d2f96a7e7e62ebe61c2c796742 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sat, 17 May 2014 16:48:12 +0100 Subject: Fix options link in help dialog This makes the options link in the help dialog cancel the default event action, so the link (`href="#"`) isn't followed. The former behaviour was most obvious when using the `LinkHints.activateModeToOpenInNewTab` command, amoung others. --- content_scripts/vimium_frontend.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index b9666aa5..3b7cd447 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -869,8 +869,10 @@ window.showHelpDialog = (html, fid) -> VimiumHelpDialog.init() - container.getElementsByClassName("optionsPage")[0].addEventListener("click", - -> chrome.runtime.sendMessage({ handler: "openOptionsPageInNewTab" }) + container.getElementsByClassName("optionsPage")[0].addEventListener("click", (clickEvent) -> + chrome.runtime.sendMessage({handler: "openOptionsPageInNewTab"}) + if clickEvent + clickEvent.preventDefault() false) -- cgit v1.2.3