mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Also focus main web instead of bottom web
This commit is contained in:
parent
41d74592f0
commit
9018140eef
1 changed files with 2 additions and 6 deletions
|
@ -201,9 +201,7 @@ class Reviewer:
|
||||||
self._drawFlag()
|
self._drawFlag()
|
||||||
self._drawMark()
|
self._drawMark()
|
||||||
self._showAnswerButton()
|
self._showAnswerButton()
|
||||||
# if we have a type answer field, focus main web
|
self.mw.web.setFocus()
|
||||||
if self.typeCorrect:
|
|
||||||
self.mw.web.setFocus()
|
|
||||||
# user hook
|
# user hook
|
||||||
gui_hooks.reviewer_did_show_question(c)
|
gui_hooks.reviewer_did_show_question(c)
|
||||||
|
|
||||||
|
@ -242,6 +240,7 @@ class Reviewer:
|
||||||
# render and update bottom
|
# render and update bottom
|
||||||
self.web.eval("_showAnswer(%s);" % json.dumps(a))
|
self.web.eval("_showAnswer(%s);" % json.dumps(a))
|
||||||
self._showEaseButtons()
|
self._showEaseButtons()
|
||||||
|
self.mw.web.setFocus()
|
||||||
# user hook
|
# user hook
|
||||||
gui_hooks.reviewer_did_show_answer(c)
|
gui_hooks.reviewer_did_show_answer(c)
|
||||||
|
|
||||||
|
@ -574,8 +573,6 @@ time = %(time)d;
|
||||||
)
|
)
|
||||||
|
|
||||||
def _showAnswerButton(self) -> None:
|
def _showAnswerButton(self) -> None:
|
||||||
if not self.typeCorrect:
|
|
||||||
self.bottom.web.setFocus()
|
|
||||||
middle = """
|
middle = """
|
||||||
<span class=stattxt>%s</span><br>
|
<span class=stattxt>%s</span><br>
|
||||||
<button title="%s" id=ansbut onclick='pycmd("ans");'>%s</button>""" % (
|
<button title="%s" id=ansbut onclick='pycmd("ans");'>%s</button>""" % (
|
||||||
|
@ -596,7 +593,6 @@ time = %(time)d;
|
||||||
self.bottom.web.adjustHeightToFit()
|
self.bottom.web.adjustHeightToFit()
|
||||||
|
|
||||||
def _showEaseButtons(self) -> None:
|
def _showEaseButtons(self) -> None:
|
||||||
self.bottom.web.setFocus()
|
|
||||||
middle = self._answerButtons()
|
middle = self._answerButtons()
|
||||||
self.bottom.web.eval("showAnswer(%s);" % json.dumps(middle))
|
self.bottom.web.eval("showAnswer(%s);" % json.dumps(middle))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue