From 0e7d688da6fde96908bee6f0b62b02aae2b95872 Mon Sep 17 00:00:00 2001 From: Stanley Yip Date: Wed, 8 Jan 2020 20:16:21 -0500 Subject: some bugfixes re previous commit --- src/client/views/nodes/DocumentView.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index b544319d7..7d6b8bf01 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -368,14 +368,17 @@ export class DocumentView extends DocComponent(Docu // console.log(e.button) // console.log(e.nativeEvent) // continue if the event hasn't been canceled AND we are using a moues or this is has an onClick or onDragStart function (meaning it is a button document) - if (InteractionUtils.IsType(e, InteractionUtils.PENTYPE) || (InkingControl.Instance.selectedTool === InkTool.Highlighter || InkingControl.Instance.selectedTool === InkTool.Pen)) { - return; - } - if (!InteractionUtils.IsType(e, InteractionUtils.MOUSETYPE)) { - e.stopPropagation(); + if (!(InteractionUtils.IsType(e, InteractionUtils.MOUSETYPE) || InkingControl.Instance.selectedTool === InkTool.Highlighter || InkingControl.Instance.selectedTool === InkTool.Pen)) { + if (!InteractionUtils.IsType(e, InteractionUtils.PENTYPE)) { + e.stopPropagation(); + } return; } - if ((!e.nativeEvent.cancelBubble || this.Document.onClick || this.Document.onDragStart)) { + // if (!InteractionUtils.IsType(e, InteractionUtils.MOUSETYPE)) { + // e.stopPropagation(); + // return; + // } + if (!e.nativeEvent.cancelBubble || this.Document.onClick || this.Document.onDragStart) { // if ((e.nativeEvent.cancelBubble && (e.button === 0 || InteractionUtils.IsType(e, InteractionUtils.TOUCHTYPE))) // // return if we're inking, and not selecting a button document // || (InkingControl.Instance.selectedTool !== InkTool.None && !this.Document.onClick) -- cgit v1.2.3-70-g09d2