aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-07-21 18:29:19 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-07-21 18:29:19 -0400
commit6f58da818dcd40615ac0acf6d7260ea22f956c60 (patch)
treec4f92101ad3989ab504ea0ac8b0e17168d12d917
parent12dd45618c0dc595b8e6663bf8d3635dd7161306 (diff)
added test to force keyboard focus to stop at first freeform collection that is hit as opposed to travelin up to the last collection -- this allows templates with nested collections to get keyboard focus.
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 8aab2e6a5..de1f2c52f 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -288,7 +288,10 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque
if (Math.abs(e.clientX - this._downX) < Utils.DRAG_THRESHOLD &&
Math.abs(e.clientY - this._downY) < Utils.DRAG_THRESHOLD) {
if (Doc.GetSelectedTool() === InkTool.None) {
- !(e.nativeEvent as any).formattedHandled && this.setPreviewCursor(e.clientX, e.clientY, false);
+ if (!(e as any).marqueeHit) {
+ (e as any).marqueeHit = true;
+ !(e.nativeEvent as any).formattedHandled && this.setPreviewCursor(e.clientX, e.clientY, false);
+ }
}
// let the DocumentView stopPropagation of this event when it selects this document
} else { // why do we get a click event when the cursor have moved a big distance?