fix type answer race condition

user may hit enter before the question has been written, due to fade out
delay
This commit is contained in:
Damien Elmes 2017-10-24 17:08:36 +10:00
parent 1cc29278f2
commit 944bca0f44

View file

@ -442,7 +442,7 @@ Please run Tools>Empty Cards""")
self.web.evalWithCallback("typeans ? typeans.value : null", self._onTypedAnswer)
def _onTypedAnswer(self, val):
self.typedAnswer = val
self.typedAnswer = val or ""
self._showAnswer()
# Bottom bar