Socket
Socket
Sign inDemoInstall

focus-trap-react

Package Overview
Dependencies
45
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

18

index.js
var React = require('react');
var ReactDOM = require('react-dom');
var focusTrap = require('focus-trap');

@@ -44,3 +43,4 @@

activateTrap: function() {
focusTrap.activate(ReactDOM.findDOMNode(this), {
if (!this.node) return;
focusTrap.activate(this.node, {
onDeactivate: this.props.onDeactivate,

@@ -52,10 +52,8 @@ initialFocus: this.props.initialFocus,

render: function() {
return React.createElement(this.props.tag,
{
className: this.props.className,
id: this.props.id,
style: this.props.style,
},
this.props.children
);
return React.createElement(this.props.tag, {
className: this.props.className,
id: this.props.id,
style: this.props.style,
ref: function(el) { this.node = el; }.bind(this),
}, this.props.children);
},

@@ -62,0 +60,0 @@ });

{
"name": "focus-trap-react",
"version": "2.0.0",
"version": "2.0.1",
"description": "A React component that traps focus.",

@@ -10,4 +10,3 @@ "main": "index.js",

"demo-watch": "watchify demo/js -d -t babelify --extension=.jsx -o demo/demo-bundle.js",
"demo-bs": "browser-sync start --server demo --files=\"demo/**/*.css,demo/index.html,demo/demo-bundle.js\"",
"demo-dev": "parallelshell \"npm run demo-watch\" \"npm run demo-bs\"",
"demo-dev": "npm run demo-watch & http-server demo",
"test-dev": "zuul --local 8080 --open -- test/index.js",

@@ -39,15 +38,18 @@ "pretest": "npm run lint",

"devDependencies": {
"babelify": "6.3.0",
"browser-sync": "2.9.11",
"browserify": "11.2.0",
"eslint": "1.7.1",
"parallelshell": "2.0.0",
"react-addons-test-utils": "^0.14.0",
"sinon": "1.17.1",
"tape": "4.2.1",
"babel-preset-react": "6.5.0",
"babelify": "7.2.0",
"browserify": "13.0.0",
"eslint": "2.2.0",
"react": "0.14.7",
"react-addons-test-utils": "0.14.7",
"react-dom": "0.14.7",
"sinon": "1.17.3",
"tape": "4.4.0",
"watchify": "3.4.0",
"zuul": "3.6.0"
"zuul": "3.9.0"
},
"dependencies": {
"focus-trap": "^1.0.0",
"focus-trap": "^1.0.2"
},
"peerDependencies": {
"react": "0.14.x",

@@ -58,3 +60,6 @@ "react-dom": "0.14.x"

"index.js"
]
],
"babel": {
"presets": ["react"]
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc