Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(fe): disable Monaco Editor read-only tooltip (#18892)

boojack5fd3688bf250
diff --git a/frontend/src/components/MonacoEditor/editor.ts b/frontend/src/components/MonacoEditor/editor.ts
index 66060099f2..1eb9e88c2a 100644
--- a/frontend/src/components/MonacoEditor/editor.ts
+++ b/frontend/src/components/MonacoEditor/editor.ts
@@ -39,6 +39,10 @@ export const createMonacoEditor = async (config: {
...config.options,
});
+ // Disable "Cannot edit in read-only editor" tooltip
+ // https://github.com/microsoft/monaco-editor/discussions/4156
+ editor.getContribution("editor.contrib.readOnlyMessageController")?.dispose();
+
MonacoEditorReadyDefer.resolve(undefined);
return editor;
@@ -61,6 +65,13 @@ export const createMonacoDiffEditor = async (config: {
...config.options,
});
+ // Disable "Cannot edit in read-only editor" tooltip
+ // https://github.com/microsoft/monaco-editor/discussions/4156
+ editor
+ .getModifiedEditor()
+ .getContribution("editor.contrib.readOnlyMessageController")
+ ?.dispose();
+
MonacoEditorReadyDefer.resolve();
return editor;