Skip to content

Commit

Permalink
Hack to make the monaco inputs render correctly when read only
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartoxian committed Nov 9, 2023
1 parent d09a898 commit 8178c52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enclave-manager/web/src/components/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const CodeEditor = ({ text, onTextChange, showLineNumbers }: CodeEditorPr
colors: {},
});
monaco.editor.setTheme("kurtosis-theme");
editor.onDidContentSizeChange(handleContentSizeChange);
if (!isReadOnly) {
editor.onDidContentSizeChange(handleContentSizeChange);
}
};

const handleChange: OnChange = (value, ev) => {
Expand Down

0 comments on commit 8178c52

Please sign in to comment.