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

react-relative-portal

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-relative-portal - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

26

dist/Portal.js

@@ -29,17 +29,2 @@ 'use strict';

function isDescendant(parent, child) {
if (parent.isEqualNode(child)) {
return true;
}
var node = child.parentNode;
while (node !== null) {
if (node.isEqualNode(parent)) {
return true;
}
node = node.parentNode;
}
return false;
}
var Portal = function (_React$Component) {

@@ -59,5 +44,10 @@ _inherits(Portal, _React$Component);

if (typeof _this.props.onOutClick === 'function') {
if (!isDescendant(_reactDom2.default.findDOMNode(_this.element), e.target)) {
_this.props.onOutClick();
}
(function () {
var root = _reactDom2.default.findDOMNode(_this.element);
if (!e.path.some(function (node) {
return node.isEqualNode && node.isEqualNode(root);
})) {
_this.props.onOutClick();
}
})();
}

@@ -64,0 +54,0 @@ };

{
"name": "react-relative-portal",
"version": "1.1.5",
"version": "1.1.6",
"description": "React component for place dropdowns outside overflow: hidden; elements",

@@ -5,0 +5,0 @@ "main": "dist/RelativePortal.js",

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