diff options
| author | mrmr1993 | 2014-05-17 16:48:12 +0100 |
|---|---|---|
| committer | mrmr1993 | 2014-05-17 16:48:12 +0100 |
| commit | 9635de33254644d2f96a7e7e62ebe61c2c796742 (patch) | |
| tree | 36ec7494d2e39c6462e0939712f4dbb51108fd92 /content_scripts | |
| parent | a7ac21b392708445374ce9767be2b65eaf89d103 (diff) | |
| download | vimium-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.coffee | 6 |
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) |
