diff --git a/ts/editor/mathjax-overlay/MathjaxEditor.svelte b/ts/editor/mathjax-overlay/MathjaxEditor.svelte index 142985405..ec90c0c65 100644 --- a/ts/editor/mathjax-overlay/MathjaxEditor.svelte +++ b/ts/editor/mathjax-overlay/MathjaxEditor.svelte @@ -99,7 +99,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html {configuration} bind:api={codeMirror} on:change={({ detail: mathjaxText }) => code.set(mathjaxText)} - on:tab + on:blur /> diff --git a/ts/editor/mathjax-overlay/MathjaxOverlay.svelte b/ts/editor/mathjax-overlay/MathjaxOverlay.svelte index 677bc9095..281b6752d 100644 --- a/ts/editor/mathjax-overlay/MathjaxOverlay.svelte +++ b/ts/editor/mathjax-overlay/MathjaxOverlay.svelte @@ -192,10 +192,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html placeHandle(true); await resetHandle(); }} - on:tab={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?) + on:blur={async () => { await resetHandle(); }} let:editor={mathjaxEditor}