diff options
author | Michael Foiani <sotech117@michaels-mbp-3.devices.brown.edu> | 2022-03-22 17:36:35 -0400 |
---|---|---|
committer | Michael Foiani <sotech117@michaels-mbp-3.devices.brown.edu> | 2022-03-22 17:36:35 -0400 |
commit | f61f6be6771415391d9e6733e4cdb1cde32e626d (patch) | |
tree | 5a2b86d2b7499b82bb80109903bc33bc21e1204f | |
parent | 73ba1a0395167ab5949f71d0c82fa7188d37ab5c (diff) |
Stop drag in present mode if element isn't specifically selected to drag.
-rw-r--r-- | src/client/util/DragManager.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index c9c499fff..8d4b98d88 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -214,6 +214,10 @@ export namespace DragManager { options?: DragOptions, dropEvent?: () => any ) { + // stop an 'accidental' on-click drag that may have occured if the user is in presenting mode + // note: dragData.dropAction is only undefined when the element itself being dragged without being selected + if (Doc.UserDoc()?.isPresenting && dragData.dropAction === undefined) return false; + const addAudioTag = (dropDoc: any) => { dropDoc && !dropDoc.creationDate && (dropDoc.creationDate = new DateField); dropDoc instanceof Doc && DocUtils.MakeLinkToActiveAudio(() => dropDoc); |