aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormrmr19932014-04-23 18:42:11 +0100
committermrmr19932014-04-23 19:31:19 +0100
commitce98782dc6881f2d8f53f7ea82b012564370cacd (patch)
tree41d42a443f9deef1bf0805b1ac4a26061e157631 /lib
parent719afdc68eda011d1f30ea8fb76f92c51609ade4 (diff)
downloadvimium-ce98782dc6881f2d8f53f7ea82b012564370cacd.tar.bz2
Add openlinks in foreground mode and fix #1035
Diffstat (limited to 'lib')
-rw-r--r--lib/dom_utils.coffee5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index 70e52a6c..9a006c2b 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -109,8 +109,9 @@ DomUtils =
eventSequence = ["mouseover", "mousedown", "mouseup", "click"]
for event in eventSequence
mouseEvent = document.createEvent("MouseEvents")
- mouseEvent.initMouseEvent(event, true, true, window, 1, 0, 0, 0, 0, modifiers.ctrlKey, false, false,
- modifiers.metaKey, 0, null)
+ mouseEvent.initMouseEvent(event, true, true, window, 1, 0, 0, 0, 0,
+ modifiers.ctrlKey == true, modifiers.altKey == true,
+ modifiers.shiftKey == true, modifiers.metaKey == true, 0, null)
# Debugging note: Firefox will not execute the element's default action if we dispatch this click event,
# but Webkit will. Dispatching a click on an input box does not seem to focus it; we do that separately
element.dispatchEvent(mouseEvent)