From 20716c137cc0f16fae8cef82ead0bf0865744f5c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 27 Oct 2016 07:26:18 +0200 Subject: [PATCH] Support tab completion for auth prompts again --- qutebrowser/mainwindow/prompt.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 741a7ea50..fe11e9425 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -658,6 +658,14 @@ class AuthenticationPrompt(_BasePrompt): self._password_lineedit.text()) return True + def item_focus(self, which): + """Support switching between fields with tab.""" + assert which in ['prev', 'next'], which + if which == 'next' and self._user_lineedit.hasFocus(): + self._password_lineedit.setFocus() + elif which == 'prev' and self._password_lineedit.hasFocus(): + self._user_lineedit.setFocus() + def _allowed_commands(self): return [('prompt-accept', "Accept"), ('leave-mode', "Abort")]