EDITOR: Work around bug in monaco-editor (#1470)

This commit is contained in:
catloversg 2024-07-08 04:38:22 +07:00 committed by GitHub
parent b7a996718b
commit 8f0ea7c8c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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();