diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-26 13:43:40 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-26 13:43:40 -0400 |
commit | 8cbc191b560684f4da32ca0320115974cad41808 (patch) | |
tree | d40ad45b550b9549c48ee0a3effa107004dcb6fa | |
parent | f82458be8bc8beaab387cc2813b7b18c9b3caac2 (diff) |
fixed prevent default
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index e98fc73e3..78fcaad27 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -185,7 +185,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu if (!e.nativeEvent.cancelBubble && !this.Document.ignoreClick && CurrentUserUtils.MainDocId !== this.props.Document[Id] && (Math.abs(e.clientX - this._downX) < Utils.DRAG_THRESHOLD && Math.abs(e.clientY - this._downY) < Utils.DRAG_THRESHOLD)) { e.stopPropagation(); - e.preventDefault(); + let preventDefault = true; if (this._doubleTap && this.props.renderDepth) { let fullScreenAlias = Doc.MakeAlias(this.props.Document); let layoutNative = await PromiseValue(Cast(this.props.Document.layoutNative, Doc)); @@ -200,7 +200,11 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu } else if (this.Document.isButton) { SelectionManager.SelectDoc(this, e.ctrlKey); // don't think this should happen if a button action is actually triggered. this.buttonClick(e.altKey, e.ctrlKey); - } else SelectionManager.SelectDoc(this, e.ctrlKey); + } else { + SelectionManager.SelectDoc(this, e.ctrlKey); + preventDefault = false; + } + preventDefault && e.preventDefault(); } } |