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

rc-trigger

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-trigger - npm Package Compare versions

Comparing version 1.9.1 to 1.10.0

32

lib/Trigger.js

@@ -49,3 +49,4 @@ 'use strict';

var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];
// use fastclick for mobile touch
var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];

@@ -69,3 +70,3 @@ var Trigger = _react2["default"].createClass({

builtinPlacements: _react.PropTypes.object,
popupTransitionName: _react.PropTypes.string,
popupTransitionName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]),
popupAnimation: _react.PropTypes.any,

@@ -85,3 +86,3 @@ mouseEnterDelay: _react.PropTypes.number,

popupVisible: _react.PropTypes.bool,
maskTransitionName: _react.PropTypes.string,
maskTransitionName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]),
maskAnimation: _react.PropTypes.string

@@ -184,9 +185,4 @@ },

currentDocument = props.getDocument();
this.clickOutsideHandler = (0, _addEventListener2["default"])(currentDocument, 'mousedown', this.onDocumentClick);
this.clickOutsideHandler = (0, _addEventListener2["default"])(currentDocument, 'click', this.onDocumentClick);
}
// always hide on mobile
if (!this.touchOutsideHandler) {
currentDocument = currentDocument || props.getDocument();
this.touchOutsideHandler = (0, _addEventListener2["default"])(currentDocument, 'touchstart', this.onDocumentClick);
}
return;

@@ -233,6 +229,2 @@ }

},
onTouchStart: function onTouchStart(e) {
this.fireEvents('onTouchStart', e);
this.preTouchTime = Date.now();
},
onBlur: function onBlur(e) {

@@ -250,8 +242,4 @@ this.fireEvents('onBlur', e);

var preTime = void 0;
if (this.preClickTime && this.preTouchTime) {
preTime = Math.min(this.preClickTime, this.preTouchTime);
} else if (this.preClickTime) {
if (this.preClickTime) {
preTime = this.preClickTime;
} else if (this.preTouchTime) {
preTime = this.preTouchTime;
}

@@ -264,3 +252,2 @@ if (Math.abs(preTime - this.focusTime) < 20) {

this.preClickTime = 0;
this.preTouchTime = 0;
event.preventDefault();

@@ -390,7 +377,2 @@ var nextVisible = !this.state.popupVisible;

}
if (this.touchOutsideHandler) {
this.touchOutsideHandler.remove();
this.touchOutsideHandler = null;
}
},

@@ -473,7 +455,5 @@ createTwoChains: function createTwoChains(event) {

newChildProps.onMouseDown = this.onMouseDown;
newChildProps.onTouchStart = this.onTouchStart;
} else {
newChildProps.onClick = this.createTwoChains('onClick');
newChildProps.onMouseDown = this.createTwoChains('onMouseDown');
newChildProps.onTouchStart = this.createTwoChains('onTouchStart');
}

@@ -480,0 +460,0 @@ if (this.isMouseEnterToShow()) {

2

package.json
{
"name": "rc-trigger",
"version": "1.9.1",
"version": "1.10.0",
"description": "base abstract trigger component for react",

@@ -5,0 +5,0 @@ "keywords": [

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