@react-aria/dnd 3.0.0-nightly.3218 → 3.0.0-nightly.3224

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -276,7 +276,6 @@ function $4620ae0dc40f0031$var$getEntryFile(entry) {
276
276
 
277
277
 
278
278
 
279
-
280
279
  let $28e10663603f5ea1$var$dropTargets = new Map();
281
280
  let $28e10663603f5ea1$var$dropItems = new Map();
282
281
  let $28e10663603f5ea1$var$dragSession = null;
@@ -444,7 +443,7 @@ class $28e10663603f5ea1$var$DragSession {
444
443
  // Android Talkback double tap has e.detail = 1 for onClick. Detect the virtual click in onPointerDown before onClick fires
445
444
  // so we can properly perform cancel and drop operations.
446
445
  this.cancelEvent(e);
447
- this.isVirtualClick = $4vY0V$reactariainteractions.isVirtualPointerEvent(e);
446
+ this.isVirtualClick = $28e10663603f5ea1$var$isVirtualPointerEvent(e);
448
447
  }
449
448
  cancelEvent(e) {
450
449
  var ref;
@@ -644,6 +643,14 @@ function $28e10663603f5ea1$var$findValidDropTargets(options) {
644
643
  return true;
645
644
  });
646
645
  }
646
+ function $28e10663603f5ea1$var$isVirtualPointerEvent(event) {
647
+ // If the pointer size is zero, then we assume it's from a screen reader.
648
+ // Android TalkBack double tap will sometimes return a event with width and height of 1
649
+ // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.
650
+ // Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
651
+ // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216
652
+ return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0;
653
+ }
647
654
 
648
655
 
649
656