react-overlays
Advanced tools
Comparing version 5.1.2 to 5.2.0
@@ -57,5 +57,7 @@ "use strict"; | ||
var handleMouseCapture = (0, _react.useCallback)(function (e) { | ||
var _e$composedPath$; | ||
var currentTarget = getRefTarget(ref); | ||
(0, _warning["default"])(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node'); | ||
preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!(0, _contains["default"])(currentTarget, e.target); | ||
preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!(0, _contains["default"])(currentTarget, (_e$composedPath$ = e.composedPath == null ? void 0 : e.composedPath()[0]) != null ? _e$composedPath$ : e.target); | ||
}, [ref]); | ||
@@ -62,0 +64,0 @@ var handleMouse = (0, _useEventCallback["default"])(function (e) { |
@@ -44,5 +44,7 @@ import contains from 'dom-helpers/contains'; | ||
var handleMouseCapture = useCallback(function (e) { | ||
var _e$composedPath$; | ||
var currentTarget = getRefTarget(ref); | ||
warning(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node'); | ||
preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains(currentTarget, e.target); | ||
preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains(currentTarget, (_e$composedPath$ = e.composedPath == null ? void 0 : e.composedPath()[0]) != null ? _e$composedPath$ : e.target); | ||
}, [ref]); | ||
@@ -49,0 +51,0 @@ var handleMouse = useEventCallback(function (e) { |
{ | ||
"name": "react-overlays", | ||
"version": "5.1.2", | ||
"version": "5.2.0", | ||
"description": "Utilities for creating robust overlay components", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
245431
5989