Proposed patch for #2858

This commit is contained in:
Penaz91 2017-07-31 21:10:09 +02:00
parent 0611dc0cb4
commit 6b99ad95d3

View File

@ -706,7 +706,9 @@ class AbstractTab(QWidget):
def _handle_auto_insert_mode(self, ok):
"""Handle auto-insert-mode after loading finished."""
if not config.get('input', 'auto-insert-mode') or not ok:
# Checks if the tab is in foreground first, then eventually sets the mode
foreground = self is objreg.get('tabbed-browser', scope='window', window=self.win_id).currentWidget()
if not config.get('input', 'auto-insert-mode') or not foreground or not ok:
return
cur_mode = self._mode_manager.mode