Skip to content

Commit

Permalink
Do not open tab for target "_blank".
Browse files Browse the repository at this point in the history
Fixes #2860.  That issue reports that, when the target is "_blank",
Firefox/Vimium ends up opening two tabs.
  • Loading branch information
smblott-github committed Dec 16, 2017
1 parent b6a0bd0 commit 1b23f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dom_utils.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1b23f70

Please sign in to comment.