From dd2027bb538ca9b1dffe62c3e5d7e167fd099cb1 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Jul 2014 16:34:58 +0200 Subject: [PATCH] Focus webview when tabs change --- qutebrowser/widgets/tabbedbrowser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/widgets/tabbedbrowser.py b/qutebrowser/widgets/tabbedbrowser.py index c23b138d2..d42631abf 100644 --- a/qutebrowser/widgets/tabbedbrowser.py +++ b/qutebrowser/widgets/tabbedbrowser.py @@ -308,7 +308,6 @@ class TabbedBrowser(TabWidget): if not background: self.setCurrentWidget(tab) tab.show() - tab.setFocus() return tab @pyqtSlot(str, int) @@ -436,8 +435,9 @@ class TabbedBrowser(TabWidget): @pyqtSlot(int) def on_current_changed(self, idx): """Set last_focused and leave hinting mode when focus changed.""" - modeman.maybe_leave('hint', 'tab changed') tab = self.widget(idx) + tab.setFocus() + modeman.maybe_leave('hint', 'tab changed') self.last_focused = self.now_focused self.now_focused = tab self.current_tab_changed.emit(tab)