Switch back to clearing MathJax preview on blur
This means two clicks are required again, but that's the lesser of two evils: https://forums.ankiweb.net/t/anki-2-1-55-beta-mathjax-preview/23529/8 Better fixes welcome :-)
This commit is contained in:
parent
29b2a2b35c
commit
e14f87ba99
@ -99,7 +99,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||||||
{configuration}
|
{configuration}
|
||||||
bind:api={codeMirror}
|
bind:api={codeMirror}
|
||||||
on:change={({ detail: mathjaxText }) => code.set(mathjaxText)}
|
on:change={({ detail: mathjaxText }) => code.set(mathjaxText)}
|
||||||
on:tab
|
on:blur
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -192,10 +192,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||||||
placeHandle(true);
|
placeHandle(true);
|
||||||
await resetHandle();
|
await resetHandle();
|
||||||
}}
|
}}
|
||||||
on:tab={async () => {
|
on:blur={async () => {
|
||||||
// Instead of resetting on blur, we reset on tab
|
|
||||||
// Otherwise, when clicking from Mathjax element to another,
|
|
||||||
// the user has to click twice (focus is called before blur?)
|
|
||||||
await resetHandle();
|
await resetHandle();
|
||||||
}}
|
}}
|
||||||
let:editor={mathjaxEditor}
|
let:editor={mathjaxEditor}
|
||||||
|
Loading…
Reference in New Issue
Block a user