Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rc-component/trigger

Package Overview
Dependencies
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rc-component/trigger - npm Package Compare versions

Comparing version 1.14.0 to 1.14.1

4

es/hooks/useWinClick.js

@@ -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 @@ };

8

es/index.js

@@ -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": {

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