aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-07-02 14:41:56 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-07-02 14:41:56 -0400
commit59868be3182e049297f7f86da368cf2733870fb2 (patch)
tree93c777a100a84398fa09679b510a7a3a84eb8a1e /src
parent219a98b7491b9c785b30f702cbd28cd33b3cbe5c (diff)
final mobile tweaks before merge?
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DocumentView.tsx10
-rw-r--r--src/mobile/MobileInterface.tsx2
2 files changed, 6 insertions, 6 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;
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 <div className="docButton"
title={"Download Image"}
style={{ backgroundColor: "white", color: "black" }}
- onClick={e => 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 */}
<FontAwesomeIcon className="documentdecorations-icon" size="sm" icon="download" />
</div>;
} else return (null);