From c17bbd47b818cf40165d51204eb4df6acc24e7df Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 26 Nov 2016 13:32:37 +0100 Subject: [PATCH] Fix QTBUG-54419 workaround for invalid URLs --- qutebrowser/mainwindow/tabbedbrowser.py | 2 +- tests/end2end/features/hints.feature | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 4198c35c6..c5f0897ac 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -527,7 +527,7 @@ class TabbedBrowser(tabwidget.TabWidget): background = self.currentIndex() != idx if (tab.backend == usertypes.Backend.QtWebEngine and - tab.needs_qtbug54419_workaround): + tab.needs_qtbug54419_workaround and url.isValid()): log.misc.debug("Doing QTBUG-54419 workaround for {}, " "url {}".format(tab, url)) self.setUpdatesEnabled(False) diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature index b6db8b47a..8d23d0199 100644 --- a/tests/end2end/features/hints.feature +++ b/tests/end2end/features/hints.feature @@ -151,6 +151,11 @@ Feature: Using hints And I hint with args "all" and follow a Then the error "Invalid link clicked - *" should be shown + Scenario: Clicking an invalid link opening in a new tab + When I open data/invalid_link.html + And I hint with args "all tab" and follow a + Then the error "Invalid link clicked - *" should be shown + Scenario: Hinting inputs without type When I open data/hints/input.html And I hint with args "inputs" and follow a