@rc-component/trigger
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -58,2 +58,3 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
win.addEventListener('click', onWinClick); | ||
win.addEventListener('contextmenu', onWinClick); | ||
@@ -65,2 +66,3 @@ // shadow root | ||
targetShadowRoot.addEventListener('click', onShadowClick); | ||
targetShadowRoot.addEventListener('contextmenu', onShadowClick); | ||
} | ||
@@ -78,5 +80,7 @@ | ||
win.removeEventListener('click', onWinClick); | ||
win.removeEventListener('contextmenu', onWinClick); | ||
if (targetShadowRoot) { | ||
targetShadowRoot.removeEventListener('mousedown', onShadowMouseDown); | ||
targetShadowRoot.removeEventListener('click', onShadowClick); | ||
targetShadowRoot.removeEventListener('contextmenu', onShadowClick); | ||
} | ||
@@ -83,0 +87,0 @@ }; |
@@ -377,4 +377,8 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
var _originChildProps$onC2; | ||
setMousePosByEvent(event); | ||
triggerOpen(true); | ||
if (openRef.current && hideActions.has('contextMenu')) { | ||
triggerOpen(false); | ||
} else { | ||
setMousePosByEvent(event); | ||
triggerOpen(true); | ||
} | ||
event.preventDefault(); | ||
@@ -381,0 +385,0 @@ |
@@ -66,2 +66,3 @@ "use strict"; | ||
win.addEventListener('click', onWinClick); | ||
win.addEventListener('contextmenu', onWinClick); | ||
@@ -73,2 +74,3 @@ // shadow root | ||
targetShadowRoot.addEventListener('click', onShadowClick); | ||
targetShadowRoot.addEventListener('contextmenu', onShadowClick); | ||
} | ||
@@ -86,5 +88,7 @@ | ||
win.removeEventListener('click', onWinClick); | ||
win.removeEventListener('contextmenu', onWinClick); | ||
if (targetShadowRoot) { | ||
targetShadowRoot.removeEventListener('mousedown', onShadowMouseDown); | ||
targetShadowRoot.removeEventListener('click', onShadowClick); | ||
targetShadowRoot.removeEventListener('contextmenu', onShadowClick); | ||
} | ||
@@ -91,0 +95,0 @@ }; |
@@ -387,4 +387,8 @@ "use strict"; | ||
var _originChildProps$onC2; | ||
setMousePosByEvent(event); | ||
triggerOpen(true); | ||
if (openRef.current && hideActions.has('contextMenu')) { | ||
triggerOpen(false); | ||
} else { | ||
setMousePosByEvent(event); | ||
triggerOpen(true); | ||
} | ||
event.preventDefault(); | ||
@@ -391,0 +395,0 @@ |
{ | ||
"name": "@rc-component/trigger", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "base abstract trigger component for react", | ||
@@ -5,0 +5,0 @@ "engines": { |
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
175232
3877