You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-onclickoutside

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-onclickoutside - npm Package Compare versions

Comparing version

to
6.3.0

12

lib/index.js
'use strict';
exports.__esModule = true;
exports.IGNORE_CLASS_NAME = undefined;
exports.default = onClickOutsideHOC;

@@ -29,5 +28,2 @@

var touchEvents = ['touchstart', 'touchmove'];
var IGNORE_CLASS_NAME = exports.IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';
/**

@@ -62,8 +58,4 @@ * This function generates the HOC function that you'll use

}
events.forEach(function (eventName) {
var handlerOptions = null;
if (!_this.props.preventDefault && touchEvents.indexOf(eventName) !== -1) {
handlerOptions = { passive: true };
}
var handlerOptions = !_this.props.preventDefault && ['touchstart', 'touchmove'].indexOf(eventName) !== -1 ? { passive: true } : null;
document.addEventListener(eventName, fn, handlerOptions);

@@ -247,3 +239,3 @@ });

excludeScrollbar: config && config.excludeScrollbar || false,
outsideClickIgnoreClass: IGNORE_CLASS_NAME,
outsideClickIgnoreClass: 'ignore-react-onclickoutside',
preventDefault: false,

@@ -250,0 +242,0 @@ stopPropagation: false

2

package.json
{
"name": "react-onclickoutside",
"version": "6.2.0",
"version": "6.3.0",
"description": "An onClickOutside wrapper for React components",

@@ -5,0 +5,0 @@ "main": "lib/index.js",