diff --git a/qutebrowser/browser/webelem.py b/qutebrowser/browser/webelem.py index 02521f3a4..85594ce43 100644 --- a/qutebrowser/browser/webelem.py +++ b/qutebrowser/browser/webelem.py @@ -403,7 +403,12 @@ class AbstractWebElement(collections.abc.MutableMapping): href_tags = ['a', 'area', 'link'] if click_target == usertypes.ClickTarget.normal: - if self.tag_name() in href_tags and self.get('target') != '_blank': + if self.tag_name() in href_tags and self.get('target') == '_blank': + log.webelem.debug("target _blank -> Clicking via href") + # FIXME:qtwebengine Should we use tab_bg here with + # background-tabs set? + self._click_href(usertypes.ClickTarget.tab) + elif self.tag_name() in href_tags: log.webelem.debug("Clicking via JS click()") self._click_js(click_target) elif self.is_editable(strict=True): diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature index 5425cecb6..bb81bc7cb 100644 --- a/tests/end2end/features/hints.feature +++ b/tests/end2end/features/hints.feature @@ -18,7 +18,6 @@ Feature: Using hints Then the following tabs should be open: - data/hello.txt (active) - @qtwebengine_skip: Opens in background Scenario: Following a hint and allow to open in new tab. When I open data/hints/link_blank.html And I hint with args "links normal" and follow a