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
This commit is contained in:
Damien Elmes 2019-02-06 10:09:05 +10:00
parent aff810c18a
commit 288ab2f8bf

View file

@ -31,7 +31,7 @@ class EditCurrent(QDialog):
self.mw.requireReset() self.mw.requireReset()
self.show() self.show()
# reset focus after open # reset focus after open
self.editor.web.setFocus() self.mw.progress.timer(100, self.editor.web.setFocus, False)
def onReset(self): def onReset(self):
# lazy approach for now: throw away edits # lazy approach for now: throw away edits