@react-aria/interactions 3.0.0-nightly.1429 → 3.0.0-nightly.1436

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
@@ -266,7 +266,7 @@ function $0294ea432cd92340$export$45712eceda6fad21(props) {
266
266
  }
267
267
  // Due to browser inconsistencies, especially on mobile browsers, we prevent
268
268
  // default on pointer down and handle focusing the pressable element ourselves.
269
- if ($0294ea432cd92340$var$shouldPreventDefault(e.target)) e.preventDefault();
269
+ if ($0294ea432cd92340$var$shouldPreventDefault(e.currentTarget)) e.preventDefault();
270
270
  state.pointerType = e.pointerType;
271
271
  e.stopPropagation();
272
272
  if (!state.isPressed) {
@@ -288,7 +288,7 @@ function $0294ea432cd92340$export$45712eceda6fad21(props) {
288
288
  // Chrome and Firefox on touch Windows devices require mouse down events
289
289
  // to be canceled in addition to pointer events, or an extra asynchronous
290
290
  // focus event will be fired.
291
- if ($0294ea432cd92340$var$shouldPreventDefault(e.target)) e.preventDefault();
291
+ if ($0294ea432cd92340$var$shouldPreventDefault(e.currentTarget)) e.preventDefault();
292
292
  e.stopPropagation();
293
293
  }
294
294
  };
@@ -342,7 +342,7 @@ function $0294ea432cd92340$export$45712eceda6fad21(props) {
342
342
  if (e.button !== 0 || !e.currentTarget.contains(e.target)) return;
343
343
  // Due to browser inconsistencies, especially on mobile browsers, we prevent
344
344
  // default on mouse down and handle focusing the pressable element ourselves.
345
- if ($0294ea432cd92340$var$shouldPreventDefault(e.target)) e.preventDefault();
345
+ if ($0294ea432cd92340$var$shouldPreventDefault(e.currentTarget)) e.preventDefault();
346
346
  e.stopPropagation();
347
347
  if (state.ignoreEmulatedMouseEvents) return;
348
348
  state.isPressed = true;
@@ -536,8 +536,8 @@ function $0294ea432cd92340$var$isOverTarget(point, target) {
536
536
  return $0294ea432cd92340$var$areRectanglesOverlapping(rect, pointRect);
537
537
  }
538
538
  function $0294ea432cd92340$var$shouldPreventDefault(target) {
539
- // We cannot prevent default if the target is inside a draggable element.
540
- return !target.closest('[draggable="true"]');
539
+ // We cannot prevent default if the target is a draggable element.
540
+ return !target.draggable;
541
541
  }
542
542
  function $0294ea432cd92340$var$shouldPreventDefaultKeyboard(target) {
543
543
  return !((target.tagName === 'INPUT' || target.tagName === 'BUTTON') && target.type === 'submit');