react-onclickoutside
Advanced tools
Comparing version 6.11.2 to 6.12.0
@@ -71,10 +71,12 @@ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),reactDom=require('react-dom');function _inheritsLoose(subClass, superClass) { | ||
// to React's 'you shouldn't care about the DOM' philosophy. | ||
// Also cover shadowRoot node by checking current.host | ||
while (current.parentNode) { | ||
if (isNodeFound(current, componentNode, ignoreClass)) { | ||
while (current.parentNode || current.host) { | ||
// Only check normal node without shadowRoot | ||
if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) { | ||
return true; | ||
} | ||
current = current.parentNode; | ||
current = current.parentNode || current.host; | ||
} | ||
@@ -225,3 +227,3 @@ | ||
if (_this.props.excludeScrollbar && clickedScrollbar(event)) return; | ||
var current = event.target; | ||
var current = event.composed && event.composedPath && event.composedPath().shift() || event.target; | ||
@@ -228,0 +230,0 @@ if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) { |
@@ -71,10 +71,12 @@ import {createElement,Component}from'react';import {findDOMNode}from'react-dom';function _inheritsLoose(subClass, superClass) { | ||
// to React's 'you shouldn't care about the DOM' philosophy. | ||
// Also cover shadowRoot node by checking current.host | ||
while (current.parentNode) { | ||
if (isNodeFound(current, componentNode, ignoreClass)) { | ||
while (current.parentNode || current.host) { | ||
// Only check normal node without shadowRoot | ||
if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) { | ||
return true; | ||
} | ||
current = current.parentNode; | ||
current = current.parentNode || current.host; | ||
} | ||
@@ -225,3 +227,3 @@ | ||
if (_this.props.excludeScrollbar && clickedScrollbar(event)) return; | ||
var current = event.target; | ||
var current = event.composed && event.composedPath && event.composedPath().shift() || event.target; | ||
@@ -228,0 +230,0 @@ if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) { |
@@ -71,10 +71,12 @@ (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('react'),require('react-dom')):typeof define==='function'&&define.amd?define(['exports','react','react-dom'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.onClickOutside={},g.React,g.ReactDOM));}(this,(function(exports, react, reactDom){'use strict';function _inheritsLoose(subClass, superClass) { | ||
// to React's 'you shouldn't care about the DOM' philosophy. | ||
// Also cover shadowRoot node by checking current.host | ||
while (current.parentNode) { | ||
if (isNodeFound(current, componentNode, ignoreClass)) { | ||
while (current.parentNode || current.host) { | ||
// Only check normal node without shadowRoot | ||
if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) { | ||
return true; | ||
} | ||
current = current.parentNode; | ||
current = current.parentNode || current.host; | ||
} | ||
@@ -225,3 +227,3 @@ | ||
if (_this.props.excludeScrollbar && clickedScrollbar(event)) return; | ||
var current = event.target; | ||
var current = event.composed && event.composedPath && event.composedPath().shift() || event.target; | ||
@@ -228,0 +230,0 @@ if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) { |
@@ -71,10 +71,12 @@ (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('react'),require('react-dom')):typeof define==='function'&&define.amd?define(['exports','react','react-dom'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.onClickOutside={},g.React,g.ReactDOM));}(this,(function(exports, react, reactDom){'use strict';function _inheritsLoose(subClass, superClass) { | ||
// to React's 'you shouldn't care about the DOM' philosophy. | ||
// Also cover shadowRoot node by checking current.host | ||
while (current.parentNode) { | ||
if (isNodeFound(current, componentNode, ignoreClass)) { | ||
while (current.parentNode || current.host) { | ||
// Only check normal node without shadowRoot | ||
if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) { | ||
return true; | ||
} | ||
current = current.parentNode; | ||
current = current.parentNode || current.host; | ||
} | ||
@@ -225,3 +227,3 @@ | ||
if (_this.props.excludeScrollbar && clickedScrollbar(event)) return; | ||
var current = event.target; | ||
var current = event.composed && event.composedPath && event.composedPath().shift() || event.target; | ||
@@ -228,0 +230,0 @@ if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) { |
{ | ||
"name": "react-onclickoutside", | ||
"version": "6.11.2", | ||
"version": "6.12.0", | ||
"description": "An onClickOutside wrapper for React components", | ||
@@ -65,3 +65,3 @@ "main": "dist/react-onclickoutside.cjs.js", | ||
"karma-chai": "^0.1.0", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"karma-firefox-launcher": "^2.1.0", | ||
"karma-mocha": "^2.0.1", | ||
@@ -68,0 +68,0 @@ "karma-spec-reporter": "0.0.31", |
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
63362
1130
6