aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authormrmr19932014-05-17 16:48:12 +0100
committermrmr19932014-05-17 16:48:12 +0100
commit9635de33254644d2f96a7e7e62ebe61c2c796742 (patch)
tree36ec7494d2e39c6462e0939712f4dbb51108fd92 /content_scripts
parenta7ac21b392708445374ce9767be2b65eaf89d103 (diff)
downloadvimium-9635de33254644d2f96a7e7e62ebe61c2c796742.tar.bz2
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.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee6
1 files changed, 4 insertions, 2 deletions
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)