From ce98782dc6881f2d8f53f7ea82b012564370cacd Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Wed, 23 Apr 2014 18:42:11 +0100 Subject: Add openlinks in foreground mode and fix #1035 --- lib/dom_utils.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3