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
@ -266,6 +266,9 @@ class Editor:
|
|||||||
self.checkValid()
|
self.checkValid()
|
||||||
runHook("loadNote", self)
|
runHook("loadNote", self)
|
||||||
|
|
||||||
|
if focusTo is not None:
|
||||||
|
self.web.setFocus()
|
||||||
|
|
||||||
self.web.evalWithCallback("setFields(%s, %s); setFonts(%s); focusField(%s)" % (
|
self.web.evalWithCallback("setFields(%s, %s); setFonts(%s); focusField(%s)" % (
|
||||||
json.dumps(data), json.dumps(self.prewrapMode()),
|
json.dumps(data), json.dumps(self.prewrapMode()),
|
||||||
json.dumps(self.fonts()), json.dumps(focusTo)),
|
json.dumps(self.fonts()), json.dumps(focusTo)),
|
||||||
|
Loading…
Reference in New Issue
Block a user