Socket
Socket
Sign inDemoInstall

react-onclickoutside

Package Overview
Dependencies
Maintainers
1
Versions
79
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 0.3.0 to 0.3.1

18

index.js

@@ -38,2 +38,18 @@ /**

var isSourceFound = function(source, localNode) {
if (source === localNode) {
return true;
}
// SVG <use/> elements do not technically reside in the rendered DOM, so
// they do not have classList directly, but they offer a link to their
// corresponding element, which can have classList. This extra check is for
// that case.
// See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement
// Discussion: https://github.com/Pomax/react-onclickoutside/pull/17
if (source.correspondingElement) {
return source.correspondingElement.classList.contains(IGNORE_CLASS);
}
return source.classList.contains(IGNORE_CLASS);
};
return {

@@ -54,3 +70,3 @@ componentDidMount: function() {

while(source.parentNode) {
found = (source === localNode || source.classList.contains(IGNORE_CLASS));
found = isSourceFound(source, localNode);
if(found) return;

@@ -57,0 +73,0 @@ source = source.parentNode;

2

package.json
{
"name": "react-onclickoutside",
"version": "0.3.0",
"version": "0.3.1",
"description": "An onClickOutside mixin for React components",

@@ -5,0 +5,0 @@ "main": "index.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