From 1e7796692551ba71cd755a122697327f4d85ccde Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 28 Sep 2020 09:29:09 -0400
Subject: fixed follow link to scroll stacking/masonry views properly.

---
 src/client/views/collections/CollectionSchemaView.tsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'src/client/views/collections/CollectionSchemaView.tsx')

diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 332a2001f..520d4c8c5 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -484,8 +484,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
             documentKeys={this.documentKeys}
             headerIsEditing={this._headerIsEditing}
             openHeader={this.openHeader}
-            onClick={e => { e.stopPropagation(); this.closeHeader(); }}
-            onPointerDown={this.onTablePointerDown}
+            onClick={this.onTableClick}
+            onPointerDown={emptyFunction}
             onResizedChange={this.onResizedChange}
             setColumns={this.setColumns}
             reorderColumns={this.reorderColumns}
@@ -520,15 +520,14 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
     }
 
     @action
-    onTablePointerDown = (e: React.PointerEvent): void => {
+    onTableClick = (e: React.MouseEvent): void => {
         if (!(e.target as any)?.className?.includes?.("collectionSchemaView-cell") && !(e.target instanceof HTMLSpanElement)) {
             this.setPreviewDoc(undefined);
-        }
-        this.setFocused(this.props.Document);
-        if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) {
+        } else {
             e.stopPropagation();
         }
-        // this.closeHeader();
+        this.setFocused(this.props.Document);
+        this.closeHeader();
     }
 
     onResizedChange = (newResized: Resize[], event: any) => {
-- 
cgit v1.2.3-70-g09d2

