From 8ab7035428524b024a56556ca3060d56b162dd57 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 31 Jul 2020 18:12:27 -0400 Subject: fixed not-selecting dockingView by setting renderDepth=-1 & checking in DocView's onCLick. --- src/client/views/MainView.tsx | 5 +---- src/client/views/collections/CollectionDockingView.tsx | 1 - src/client/views/nodes/DocumentView.tsx | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 6009f7dab..85f695b85 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -361,7 +361,7 @@ export class MainView extends React.Component { docFilters={returnEmptyFilter} ContainingCollectionView={undefined} ContainingCollectionDoc={undefined} - renderDepth={0} + renderDepth={-1} />; } @computed get dockingContent() { @@ -373,8 +373,6 @@ export class MainView extends React.Component { ; } - _canClick = false; - @action onPropertiesPointerDown = (e: React.PointerEvent) => { setupMoveUpEvents(this, e, action((e: PointerEvent, down: number[], delta: number[]) => { @@ -389,7 +387,6 @@ export class MainView extends React.Component { if (this._flyoutTranslate) { setupMoveUpEvents(this, e, action((e: PointerEvent) => { this.flyoutWidth = Math.max(e.clientX, 0); - Math.abs(this.flyoutWidth - this._flyoutSizeOnDown) > 6 && (this._canClick = false); this.sidebarButtonsDoc._columnWidth = this.flyoutWidth / 3 - 30; return false; }), emptyFunction, action(() => { diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 375df8786..9ce5cb03b 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -463,7 +463,6 @@ export class CollectionDockingView extends React.Component { diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 31b2586e9..62a786a03 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -289,7 +289,7 @@ export class DocumentView extends DocComponent(Docu } onClick = action((e: React.MouseEvent | React.PointerEvent) => { - if (!e.nativeEvent.cancelBubble && !this.Document.ignoreClick && + if (!e.nativeEvent.cancelBubble && !this.Document.ignoreClick && this.props.renderDepth >= 0 && (Math.abs(e.clientX - this._downX) < Utils.DRAG_THRESHOLD && Math.abs(e.clientY - this._downY) < Utils.DRAG_THRESHOLD)) { let stopPropagate = true; let preventDefault = true; -- cgit v1.2.3-70-g09d2