diff --git a/src/editor-mathfield/mathfield-private.ts b/src/editor-mathfield/mathfield-private.ts index 7e63ce90d..2eba85e0c 100644 --- a/src/editor-mathfield/mathfield-private.ts +++ b/src/editor-mathfield/mathfield-private.ts @@ -1729,11 +1729,7 @@ If you are using Vue, this may be because you are using the runtime-only build o { once: true, signal } ); - // If we haven't received a visibility change after a short delay, - // stop waiting for it (the delay has to be longer than at least - // 16ms: the documents that are not visible are throttled by the - // browser) - setTimeout(() => controller.abort(), 100); + document.addEventListener('focusin', () => controller.abort(), { once: true }); } onInput(text: string): void {