diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-07-02 14:41:56 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-07-02 14:41:56 -0400 |
commit | 59868be3182e049297f7f86da368cf2733870fb2 (patch) | |
tree | 93c777a100a84398fa09679b510a7a3a84eb8a1e /src/client/views/nodes/DocumentView.tsx | |
parent | 219a98b7491b9c785b30f702cbd28cd33b3cbe5c (diff) |
final mobile tweaks before merge?
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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<DocumentViewProps, Document>(Docu onContextMenu = async (e: React.MouseEvent | Touch): Promise<void> => { // 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; |