From 288ab2f8bff6821bf18d05fd2bd13e6cbe916005 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 6 Feb 2019 10:09:05 +1000 Subject: [PATCH] focus web area after delay in editcurrent if fired immediately, web area fails to gain focus, leading to a jumping cursor when clicking on a field for the first time https://anki.tenderapp.com/discussions/beta-testing/1348-anki-217-beta#comment_46821120 --- aqt/editcurrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/editcurrent.py b/aqt/editcurrent.py index 12e5cecae..2b4f521ea 100644 --- a/aqt/editcurrent.py +++ b/aqt/editcurrent.py @@ -31,7 +31,7 @@ class EditCurrent(QDialog): self.mw.requireReset() self.show() # reset focus after open - self.editor.web.setFocus() + self.mw.progress.timer(100, self.editor.web.setFocus, False) def onReset(self): # lazy approach for now: throw away edits