From 1b23f70fa75592422056342cd7d9297d0804ea3f Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 16 Dec 2017 11:24:12 +0000 Subject: Do not open tab for target "_blank". Fixes #2860. That issue reports that, when the target is "_blank", Firefox/Vimium ends up opening two tabs. --- lib/dom_utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 67d5a44c..ebd9cf3d 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -250,7 +250,7 @@ DomUtils = eventSequence = ["mouseover", "mousedown", "mouseup", "click"] for event in eventSequence defaultActionShouldTrigger = @simulateMouseEvent event, element, modifiers - if event == "click" and defaultActionShouldTrigger and Utils.isFirefox() + if event == "click" and defaultActionShouldTrigger and Utils.isFirefox() and element.target != "_blank" # Firefox doesn't (currently) trigger the default action for modified keys. DomUtils.simulateClickDefaultAction element, modifiers defaultActionShouldTrigger # return the values returned by each @simulateMouseEvent call. -- cgit v1.2.3