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.0.1 to 1.1.0

19

dist/Portal.js

@@ -29,4 +29,15 @@ 'use strict';

function getRID(node) {
return node && node.dataset && node.dataset.reactid || '';
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;
}

@@ -47,5 +58,3 @@

_this.handleOutClick = function (e) {
var rid = getRID(_reactDom2.default.findDOMNode(_this.element));
var eRid = getRID(e.target);
if (eRid.indexOf(rid) !== 0 && _this.props.onOutClick) {
if (!isDescendant(_reactDom2.default.findDOMNode(_this.element), e.target)) {
_this.props.onOutClick();

@@ -52,0 +61,0 @@ }

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

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

"peerDependencies": {
"react": "^0.14.2",
"react-dom": "^0.14.2"
"react": ">=0.14.0",
"react-dom": ">=0.14.0"
}
}
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