From 8f0ea7c8c4ace2a5a23baba554bd919f1452bd02 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:38:22 +0700 Subject: [PATCH] EDITOR: Work around bug in monaco-editor (#1470) --- src/ScriptEditor/ui/Editor.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ScriptEditor/ui/Editor.tsx b/src/ScriptEditor/ui/Editor.tsx index 7c69c2a89..5e6dd0583 100644 --- a/src/ScriptEditor/ui/Editor.tsx +++ b/src/ScriptEditor/ui/Editor.tsx @@ -41,6 +41,11 @@ export function Editor({ onMount, onChange, onUnmount }: EditorProps) { onChange(editorRef.current?.getValue()); }); + // This is the workaround for a bug in monaco-editor: https://github.com/microsoft/monaco-editor/issues/4455 + if (containerDiv.current.firstElementChild) { + (containerDiv.current.firstElementChild as HTMLElement).style.outline = "none"; + } + // Unmounting return () => { onUnmount();