diff --git a/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v5/CodeMirror.tsx b/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v5/CodeMirror.tsx index 5b9ded4cfd8..5e964775837 100644 --- a/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v5/CodeMirror.tsx +++ b/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v5/CodeMirror.tsx @@ -719,11 +719,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: ForwardedRef { const output = { ...styles.cellViewer }; if (!props.visiblePanes.includes('viewer')) { - // Note: setting webview.display to "none" is currently not supported due - // to this bug: https://github.com/electron/electron/issues/8277 - // So instead setting the width 0. - output.width = 1; - output.maxWidth = 1; + output.display = 'none'; } else if (!props.visiblePanes.includes('editor')) { output.borderLeftStyle = 'none'; } diff --git a/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v6/CodeMirror.tsx b/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v6/CodeMirror.tsx index 05625153e79..2a99f15951a 100644 --- a/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v6/CodeMirror.tsx +++ b/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/v6/CodeMirror.tsx @@ -303,11 +303,7 @@ const CodeMirror = (props: NoteBodyEditorProps, ref: ForwardedRef { const output = { ...styles.cellViewer }; if (!props.visiblePanes.includes('viewer')) { - // Note: setting webview.display to "none" is currently not supported due - // to this bug: https://github.com/electron/electron/issues/8277 - // So instead setting the width 0. - output.width = 1; - output.maxWidth = 1; + output.display = 'none'; } else if (!props.visiblePanes.includes('editor')) { output.borderLeftStyle = 'none'; }