Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix middle pane size increasing on exiting focus mode

Abdullah Attab8c68b516373
diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx
index 89124864c..ca0131087 100644
--- a/apps/web/src/app.tsx
+++ b/apps/web/src/app.tsx
@@ -142,8 +142,13 @@ function DesktopAppContents({
}, [show]);
useEffect(() => {
- if (isFocusMode) navPane.current?.collapse();
- else navPane.current?.expand();
+ if (isFocusMode) {
+ const middlePaneSize = middlePane.current?.getSize() || 20;
+ navPane.current?.collapse();
+ // the middle pane has to be resized because collapsing the nav
+ // pane increases the middle pane's size every time.
+ middlePane.current?.resize(middlePaneSize);
+ } else navPane.current?.expand();
}, [isFocusMode]);
return (
@@ -193,7 +198,7 @@ function DesktopAppContents({
</ScopedThemeProvider>
</Panel>
<PanelResizeHandle className="panel-resize-handle" />
- <Panel className="editor-pane">
+ <Panel className="editor-pane" defaultSize={70}>
<Flex
sx={{
display: "flex",