Re-focus web view when leaving prompt/yesno mode.
This commit is contained in:
parent
03ac8874ff
commit
89c7f3ecfe
@ -508,9 +508,11 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
@pyqtSlot(usertypes.KeyMode)
|
@pyqtSlot(usertypes.KeyMode)
|
||||||
def on_mode_left(self, mode):
|
def on_mode_left(self, mode):
|
||||||
"""Give focus to current tab if command mode was left."""
|
"""Give focus to current tab if command mode was left."""
|
||||||
if mode == usertypes.KeyMode.command:
|
if mode in (usertypes.KeyMode.command, usertypes.KeyMode.prompt,
|
||||||
|
usertypes.KeyMode.yesno):
|
||||||
widget = self.currentWidget()
|
widget = self.currentWidget()
|
||||||
log.modes.debug("Left command mode, focusing {!r}".format(widget))
|
log.modes.debug("Left status-input mode, focusing {!r}".format(
|
||||||
|
widget))
|
||||||
if widget is None:
|
if widget is None:
|
||||||
return
|
return
|
||||||
widget.setFocus()
|
widget.setFocus()
|
||||||
|
Loading…
Reference in New Issue
Block a user