Socket
Socket
Sign inDemoInstall

@react-aria/interactions

Package Overview
Dependencies
Maintainers
2
Versions
771
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/interactions - npm Package Compare versions

Comparing version 3.0.0-nightly.774 to 3.0.0-nightly.778

74

dist/main.js

@@ -1206,50 +1206,52 @@ var _react2 = require("react");

}
}; // Use pointer events if available. Otherwise, fall back to mouse and touch events.
};
/*
// FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=1675846 prevents us from using this pointerevent
// once it's fixed we can uncomment
// Use pointer events if available. Otherwise, fall back to mouse and touch events.
if (typeof PointerEvent !== 'undefined') {
let onPointerUp = e => {
if (state.isPointerDown && onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
let onPointerUp = (e) => {
if (state.isPointerDown && onInteractOutside && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
}; // changing these to capture phase fixed combobox
};
// changing these to capture phase fixed combobox
document.addEventListener('pointerdown', onPointerDown, true);
document.addEventListener('pointerup', onPointerUp, true);
return () => {
return () => {
document.removeEventListener('pointerdown', onPointerDown, true);
document.removeEventListener('pointerup', onPointerUp, true);
};
} else {
let onMouseUp = e => {
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
} else {*/
let onTouchEnd = e => {
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
let onMouseUp = e => {
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
document.addEventListener('mousedown', onPointerDown, true);
document.addEventListener('mouseup', onMouseUp, true);
document.addEventListener('touchstart', onPointerDown, true);
document.addEventListener('touchend', onTouchEnd, true);
return () => {
document.removeEventListener('mousedown', onPointerDown, true);
document.removeEventListener('mouseup', onMouseUp, true);
document.removeEventListener('touchstart', onPointerDown, true);
document.removeEventListener('touchend', onTouchEnd, true);
};
}
let onTouchEnd = e => {
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
document.addEventListener('mousedown', onPointerDown, true);
document.addEventListener('mouseup', onMouseUp, true);
document.addEventListener('touchstart', onPointerDown, true);
document.addEventListener('touchend', onTouchEnd, true);
return () => {
document.removeEventListener('mousedown', onPointerDown, true);
document.removeEventListener('mouseup', onMouseUp, true);
document.removeEventListener('touchstart', onPointerDown, true);
document.removeEventListener('touchend', onTouchEnd, true);
};
}, [onInteractOutside, ref, state.ignoreEmulatedMouseEvents, state.isPointerDown]);

@@ -1256,0 +1258,0 @@ }

@@ -1155,50 +1155,52 @@ import _react, { useContext, useEffect, useMemo, useRef, useState } from "react";

}
}; // Use pointer events if available. Otherwise, fall back to mouse and touch events.
};
/*
// FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=1675846 prevents us from using this pointerevent
// once it's fixed we can uncomment
// Use pointer events if available. Otherwise, fall back to mouse and touch events.
if (typeof PointerEvent !== 'undefined') {
let onPointerUp = e => {
if (state.isPointerDown && onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
let onPointerUp = (e) => {
if (state.isPointerDown && onInteractOutside && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
}; // changing these to capture phase fixed combobox
};
// changing these to capture phase fixed combobox
document.addEventListener('pointerdown', onPointerDown, true);
document.addEventListener('pointerup', onPointerUp, true);
return () => {
return () => {
document.removeEventListener('pointerdown', onPointerDown, true);
document.removeEventListener('pointerup', onPointerUp, true);
};
} else {
let onMouseUp = e => {
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
} else {*/
let onTouchEnd = e => {
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
let onMouseUp = e => {
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
document.addEventListener('mousedown', onPointerDown, true);
document.addEventListener('mouseup', onMouseUp, true);
document.addEventListener('touchstart', onPointerDown, true);
document.addEventListener('touchend', onTouchEnd, true);
return () => {
document.removeEventListener('mousedown', onPointerDown, true);
document.removeEventListener('mouseup', onMouseUp, true);
document.removeEventListener('touchstart', onPointerDown, true);
document.removeEventListener('touchend', onTouchEnd, true);
};
}
let onTouchEnd = e => {
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
document.addEventListener('mousedown', onPointerDown, true);
document.addEventListener('mouseup', onMouseUp, true);
document.addEventListener('touchstart', onPointerDown, true);
document.addEventListener('touchend', onTouchEnd, true);
return () => {
document.removeEventListener('mousedown', onPointerDown, true);
document.removeEventListener('mouseup', onMouseUp, true);
document.removeEventListener('touchstart', onPointerDown, true);
document.removeEventListener('touchend', onTouchEnd, true);
};
}, [onInteractOutside, ref, state.ignoreEmulatedMouseEvents, state.isPointerDown]);

@@ -1205,0 +1207,0 @@ }

{
"name": "@react-aria/interactions",
"version": "3.0.0-nightly.774+f8a02707",
"version": "3.0.0-nightly.778+32a59e19",
"description": "Spectrum UI components in React",

@@ -21,4 +21,4 @@ "license": "Apache-2.0",

"@babel/runtime": "^7.6.2",
"@react-aria/utils": "3.0.0-nightly.774+f8a02707",
"@react-types/shared": "3.0.0-nightly.774+f8a02707"
"@react-aria/utils": "3.0.0-nightly.778+32a59e19",
"@react-types/shared": "3.0.0-nightly.778+32a59e19"
},

@@ -31,3 +31,3 @@ "peerDependencies": {

},
"gitHead": "f8a02707da1932fe5d0a12acc7a8c1d646fa133c"
"gitHead": "32a59e198acd249536c92347767eedfcd3470590"
}

@@ -43,3 +43,5 @@ /*

};
/*
// FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=1675846 prevents us from using this pointerevent
// once it's fixed we can uncomment
// Use pointer events if available. Otherwise, fall back to mouse and touch events.

@@ -62,32 +64,31 @@ if (typeof PointerEvent !== 'undefined') {

};
} else {
let onMouseUp = (e) => {
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
} else {*/
let onMouseUp = (e) => {
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
let onTouchEnd = (e) => {
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
let onTouchEnd = (e) => {
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
}
};
document.addEventListener('mousedown', onPointerDown, true);
document.addEventListener('mouseup', onMouseUp, true);
document.addEventListener('touchstart', onPointerDown, true);
document.addEventListener('touchend', onTouchEnd, true);
document.addEventListener('mousedown', onPointerDown, true);
document.addEventListener('mouseup', onMouseUp, true);
document.addEventListener('touchstart', onPointerDown, true);
document.addEventListener('touchend', onTouchEnd, true);
return () => {
document.removeEventListener('mousedown', onPointerDown, true);
document.removeEventListener('mouseup', onMouseUp, true);
document.removeEventListener('touchstart', onPointerDown, true);
document.removeEventListener('touchend', onTouchEnd, true);
};
}
return () => {
document.removeEventListener('mousedown', onPointerDown, true);
document.removeEventListener('mouseup', onMouseUp, true);
document.removeEventListener('touchstart', onPointerDown, true);
document.removeEventListener('touchend', onTouchEnd, true);
};
}, [onInteractOutside, ref, state.ignoreEmulatedMouseEvents, state.isPointerDown]);

@@ -94,0 +95,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc