From 59868be3182e049297f7f86da368cf2733870fb2 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 2 Jul 2020 14:41:56 -0400 Subject: final mobile tweaks before merge? --- src/client/views/nodes/DocumentView.tsx | 10 +++++----- src/mobile/MobileInterface.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 732089068..37d8df47d 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -720,19 +720,19 @@ export class DocumentView extends DocComponent(Docu onContextMenu = async (e: React.MouseEvent | Touch): Promise => { // the touch onContextMenu is button 0, the pointer onContextMenu is button 2 if (!(e instanceof Touch)) { - if (e?.button === 0 && !e.ctrlKey) { - e?.preventDefault(); + if (e.button === 0 && !e.ctrlKey) { + e.preventDefault(); return; } - e?.persist(); - e?.stopPropagation(); + e.persist(); + e.stopPropagation(); if (Math.abs(this._downX - e?.clientX) > 3 || Math.abs(this._downY - e?.clientY) > 3 || e?.isDefaultPrevented()) { e?.preventDefault(); return; } - e?.preventDefault(); + e.preventDefault(); } const cm = ContextMenu.Instance; diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index 1bf1fb022..47768fd09 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -494,7 +494,7 @@ export class MobileInterface extends React.Component { return
window.open(this._activeDoc["data-path"]?.toString())}> // daa-path holds the url + onClick={e => window.open(this._activeDoc["data-path"]?.toString())}> {/* daa-path holds the url */}
; } else return (null); -- cgit v1.2.3-70-g09d2