mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
if focusTo provided, ensure webview is focused
fixes https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43155562
This commit is contained in:
parent
17693f1b63
commit
2219736adc
1 changed files with 3 additions and 0 deletions
|
@ -266,6 +266,9 @@ class Editor:
|
|||
self.checkValid()
|
||||
runHook("loadNote", self)
|
||||
|
||||
if focusTo is not None:
|
||||
self.web.setFocus()
|
||||
|
||||
self.web.evalWithCallback("setFields(%s, %s); setFonts(%s); focusField(%s)" % (
|
||||
json.dumps(data), json.dumps(self.prewrapMode()),
|
||||
json.dumps(self.fonts()), json.dumps(focusTo)),
|
||||
|
|
Loading…
Reference in a new issue