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

react-focus-lock

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-focus-lock - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

5

package.json
{
"name": "react-focus-lock",
"version": "1.3.2",
"version": "1.3.3",
"description": "It is a trap! (for a focus)",

@@ -60,4 +60,5 @@ "main": "dist/index.js",

"dependencies": {
"react-side-effect": "1.1.3"
"focus-lock": "0.0.2-2",
"react-side-effect": "^1.1.3"
}
}

@@ -26,2 +26,9 @@ # react-focus-lock

# Behavior
0. It will always keep focus inside Lock.
1. It will cycle forward then you press Tab.
2. It will cycle in reverse direction on Shift+Tab.
3. It will do it using _browser_ tools, not emulation.
4. It will handle positive tabIndex inside form.
5. It will prevent any jump outside, returning focus to the last element.

@@ -28,0 +35,0 @@ You can use nested Locks or have more than one Lock on the page.

7

src/Trap.js
import React, { PropTypes } from 'react';
import withSideEffect from 'react-side-effect';
import withSideEffect from 'react-side-effect'
import moveFocusInside, { focusInside, tabHook } from 'focus-lock';
/*import moveFocusInside from './setFocus';
import focusInside from './utils/focusInside';
import moveFocusInside from './setFocus';
import tabHook from './tabHook';
/**/

@@ -7,0 +10,0 @@ const FocusTrap = ({ children, onBlur, onFocus }) => (

Sorry, the diff of this file is not supported yet

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