prevent preview stealing focus in clayout
setHtml() steals focus due to webengine bug - fixes https://anki.tenderapp.com/discussions/beta-testing/206-anki-210-alpha-7#comment_41700440
This commit is contained in:
parent
75c22c999b
commit
08747747bf
@ -226,12 +226,16 @@ Please create a new card type first."""))
|
||||
c = self.card
|
||||
ti = self.maybeTextInput
|
||||
base = self.mw.baseHTML()
|
||||
self.tab['pform'].frontWeb.setEnabled(False)
|
||||
self.tab['pform'].backWeb.setEnabled(False)
|
||||
self.tab['pform'].frontWeb.stdHtml(
|
||||
ti(mungeQA(self.mw.col, c.q(reload=True))), self.mw.reviewer._styles(),
|
||||
bodyClass="card card%d" % (c.ord+1), head=base),
|
||||
self.tab['pform'].backWeb.stdHtml(
|
||||
ti(mungeQA(self.mw.col, c.a()), type='a'), self.mw.reviewer._styles(),
|
||||
bodyClass="card card%d" % (c.ord+1), head=base),
|
||||
self.tab['pform'].frontWeb.setEnabled(True)
|
||||
self.tab['pform'].backWeb.setEnabled(True)
|
||||
clearAudioQueue()
|
||||
if c.id not in self.playedAudio:
|
||||
playFromText(c.q())
|
||||
|
Loading…
Reference in New Issue
Block a user