Focus webview when tabs change
This commit is contained in:
parent
3b2acf32b5
commit
dd2027bb53
@ -308,7 +308,6 @@ class TabbedBrowser(TabWidget):
|
|||||||
if not background:
|
if not background:
|
||||||
self.setCurrentWidget(tab)
|
self.setCurrentWidget(tab)
|
||||||
tab.show()
|
tab.show()
|
||||||
tab.setFocus()
|
|
||||||
return tab
|
return tab
|
||||||
|
|
||||||
@pyqtSlot(str, int)
|
@pyqtSlot(str, int)
|
||||||
@ -436,8 +435,9 @@ class TabbedBrowser(TabWidget):
|
|||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
def on_current_changed(self, idx):
|
def on_current_changed(self, idx):
|
||||||
"""Set last_focused and leave hinting mode when focus changed."""
|
"""Set last_focused and leave hinting mode when focus changed."""
|
||||||
modeman.maybe_leave('hint', 'tab changed')
|
|
||||||
tab = self.widget(idx)
|
tab = self.widget(idx)
|
||||||
|
tab.setFocus()
|
||||||
|
modeman.maybe_leave('hint', 'tab changed')
|
||||||
self.last_focused = self.now_focused
|
self.last_focused = self.now_focused
|
||||||
self.now_focused = tab
|
self.now_focused = tab
|
||||||
self.current_tab_changed.emit(tab)
|
self.current_tab_changed.emit(tab)
|
||||||
|
Loading…
Reference in New Issue
Block a user