From d2052ad236ef49328ebada652c9ef90a533d8802 Mon Sep 17 00:00:00 2001 From: meinzzzz Date: Mon, 24 Nov 2025 21:51:59 +0100 Subject: [PATCH] Disable mathlive sound effects --- packages/ckeditor5-math/src/ui/mathliveinputview.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ckeditor5-math/src/ui/mathliveinputview.ts b/packages/ckeditor5-math/src/ui/mathliveinputview.ts index d337a9bdb..6b4930805 100644 --- a/packages/ckeditor5-math/src/ui/mathliveinputview.ts +++ b/packages/ckeditor5-math/src/ui/mathliveinputview.ts @@ -1,5 +1,5 @@ import { View, type Locale } from 'ckeditor5'; -import 'mathlive'; +import { MathfieldElement } from 'mathlive'; /** * A view that wraps the MathLive `` web component for interactive LaTeX equation editing. @@ -48,6 +48,10 @@ export default class MathLiveInputView extends View { */ public override render(): void { super.render(); + // Disable sounds before creating mathfield + if (typeof MathfieldElement !== 'undefined') { + MathfieldElement.soundsDirectory = null; + } // (Removed global area click-to-focus logic; focusing now relies on direct field interaction.)