From c1be3afe5d24532866619ff499df8b532e6d37d9 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Thu, 12 Jun 2025 12:30:29 +0200 Subject: [PATCH] Turn off CodeMirror's use of EditContext since a bug in Chrome causes the IME interface to show up in the wrong position --- src/editor/editor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/editor/editor.js b/src/editor/editor.js index ab1742b..f09562d 100644 --- a/src/editor/editor.js +++ b/src/editor/editor.js @@ -29,6 +29,12 @@ import { useHeynoteStore } from "../stores/heynote-store.js"; import { useErrorStore } from "../stores/error-store.js"; +// Turn off the use of EditContext, since Chrome has a bug (https://issues.chromium.org/issues/351029417) +// that causes it to position the IME interface (for chinese input) incorrectly. One the bug is fixed (in Electron) +// we should be able to remove this. For more details see: https://github.com/heyman/heynote/issues/343 +EditorView.EDIT_CONTEXT = false + + export class HeynoteEditor { constructor({ element,