diff --git a/qutebrowser/widgets/tabwidget.py b/qutebrowser/widgets/tabwidget.py index 6bf73e3da..c642cbd50 100644 --- a/qutebrowser/widgets/tabwidget.py +++ b/qutebrowser/widgets/tabwidget.py @@ -130,9 +130,11 @@ class TabBar(QTabBar): """Override mousePressEvent to emit tabCloseRequested on rightclick.""" if e.button() != Qt.RightButton: super().mousePressEvent(e) + return idx = self.tabAt(e.pos()) if idx == -1: super().mousePressEvent(e) + return self.tabCloseRequested.emit(idx) def tabSizeHint(self, index): diff --git a/qutebrowser/widgets/webview.py b/qutebrowser/widgets/webview.py index ffd5b2e7c..f1385fa51 100644 --- a/qutebrowser/widgets/webview.py +++ b/qutebrowser/widgets/webview.py @@ -548,6 +548,7 @@ class WebView(QWebView): if e.button() in (Qt.XButton1, Qt.XButton2): self._mousepress_backforward(e) super().mousePressEvent(e) + return self._mousepress_insertmode(e) self._mousepress_opentarget(e) super().mousePressEvent(e)