react-relative-portal
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -29,16 +29,2 @@ 'use strict'; | ||
function eventPath(e) { | ||
if (e.path) { | ||
return e.path; | ||
} | ||
var path = []; | ||
var node = e.target; | ||
while (!document.body.isEqualNode(node)) { | ||
path.push(node); | ||
node = node.parentNode; | ||
} | ||
return path; | ||
} | ||
var Portal = function (_React$Component) { | ||
@@ -58,10 +44,6 @@ _inherits(Portal, _React$Component); | ||
if (typeof _this.props.onOutClick === 'function') { | ||
(function () { | ||
var root = _reactDom2.default.findDOMNode(_this.element); | ||
if (!eventPath(e).some(function (node) { | ||
return node.isEqualNode && node.isEqualNode(root); | ||
})) { | ||
_this.props.onOutClick(); | ||
} | ||
})(); | ||
var root = _reactDom2.default.findDOMNode(_this.element); | ||
if (!root.contains(e.target)) { | ||
_this.props.onOutClick(); | ||
} | ||
} | ||
@@ -68,0 +50,0 @@ }; |
{ | ||
"name": "react-relative-portal", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "React component for place dropdowns outside overflow: hidden; elements", | ||
@@ -5,0 +5,0 @@ "main": "dist/RelativePortal.js", |
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
14499
208