diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-25 19:01:34 -0500 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-25 19:01:34 -0500 |
commit | 4fe5eebb3a02ac7cb86a54aa4350ae40cbfdd343 (patch) | |
tree | 6ff64205c634fed55411305b689e92f353c7b14c /src/client/views/nodes/DocumentView.tsx | |
parent | 8d015ff599c145578166dda3013c6aaec1d34450 (diff) | |
parent | 1763ff090ea734ca275c3c28edc6c303c935b801 (diff) |
Merge branch 'master' of github.com:brown-dash/Dash-Web into master
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 054d01d8e..b94db2c6b 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -696,6 +696,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps } }); + @action onPointerDown = (e: React.PointerEvent): void => { if (this.rootDoc.type === DocumentType.INK && Doc.ActiveTool === InkTool.Eraser) return; // continue if the event hasn't been canceled AND we are using a mouse or this has an onClick or onDragStart function (meaning it is a button document) @@ -736,6 +737,9 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps } document.removeEventListener('pointerup', this.onPointerUp); document.addEventListener('pointerup', this.onPointerUp); + } else { + this._cursorTimer && clearTimeout(this._cursorTimer); + this._cursorPress = false; } }; |