From 7d415bca08a17481d44d6bcd3b0df2672f6f5db0 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sat, 25 Sep 2021 12:30:35 -0400
Subject: added a hacky fix to what seems to be a Chrome bug when auto
 expanding the left flyout panel

---
 src/client/views/MainView.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/client/views/MainView.tsx')

diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 35c5801e5..7edcd6217 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -467,7 +467,13 @@ export class MainView extends React.Component {
     }
 
     expandFlyout = action((button: Doc) => {
+        // bcz: What's going on here!?  
+        // Chrome(not firefox) seems to have a bug when the flyout expands and there's a zoomed freeform tab.  All of the div below the CollectionFreeFormView's main div
+        // generate the wrong value from getClientRectangle() -- specifically they return an 'x' that is the flyout's width greater than it should be.
+        // interactively adjusting the flyout fixes the problem.  So does programmatically changing the value after a timeout to something *fractionally* different (ie, 1.5, not 1);)
         this._leftMenuFlyoutWidth = (this._leftMenuFlyoutWidth || 250);
+        setTimeout(action(() => this._leftMenuFlyoutWidth += 0.5), 0);
+
         this._sidebarContent.proto = button.target as any;
         this.LastButton = button;
     });
-- 
cgit v1.2.3-70-g09d2

