Skip to content

Commit

Permalink
Desktop: Resolves #9890: Fix hiding the note preview pane is very slo…
Browse files Browse the repository at this point in the history
…w for large notes (#10006)
  • Loading branch information
personalizedrefrigerator authored Mar 2, 2024
1 parent 4827d0b commit f6c7213
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: ForwardedRef<NoteBodyEditor
const cellViewerStyle = useMemo(() => {
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';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,7 @@ const CodeMirror = (props: NoteBodyEditorProps, ref: ForwardedRef<NoteBodyEditor
const cellViewerStyle = useMemo(() => {
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';
}
Expand Down

0 comments on commit f6c7213

Please sign in to comment.