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.11.1 to 1.11.2

2

dist/Trap.js

@@ -57,3 +57,3 @@ 'use strict';

if (persistentFocus || !focusOnBody() || !lastActiveFocus && autoFocus) {
if (workingNode && !((0, _focusLock.focusInside)(workingNode) || focusIsPortaledPair(activeElement, workingNode))) {
if (workingNode && !((0, _focusLock.focusInside)(workingNode) || focusIsPortaledPair(activeElement, workingNode) || workingNode.contains && workingNode.contains(activeElement))) {
onActivation();

@@ -60,0 +60,0 @@ if (document && !lastActiveFocus && activeElement && !autoFocus) {

{
"name": "react-focus-lock",
"version": "1.11.1",
"version": "1.11.2",
"description": "It is a trap! (for a focus)",

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

@@ -13,3 +13,3 @@ import React from 'react';

import {Trap1, Trap2, Trap3, Trap4} from './Checkboxes';
import {TextSelectionEnabled, TextSelectionDisabled} from './TextSelection';
import {TextSelectionEnabled, TextSelectionDisabled, TextSelectionTabIndexEnabled} from './TextSelection';
import JumpCase from './Jump';

@@ -42,3 +42,4 @@ import GroupCase from './Group';

.add('enabled', () => <Frame><TextSelectionEnabled/></Frame>)
.add('disabled', () => <Frame><TextSelectionDisabled/></Frame>);
.add('disabled', () => <Frame><TextSelectionDisabled/></Frame>)
.add('tabindex -1', () => <Frame><TextSelectionTabIndexEnabled/></Frame>);

@@ -45,0 +46,0 @@ storiesOf('Jump', module)

@@ -34,4 +34,6 @@ import React, {Component} from "react";

Some text
{this.props.children}
<input placeholder="input2"/>
<input placeholder="input3"/> <br/>
{ Array(100).fill(1).map(x => <div>{x}---</div>)}
Some text

@@ -66,6 +68,23 @@ <button>A BUTTON</button>

const TextSelectionTabIndexEnabled = () =>
<div style={styles}>
<input placeholder="input1"/>
Some text
<div style={bg}>
<Trap allowTextSelection>
<div tabIndex={-1}>
test
<input />
set
</div>
</Trap>
</div>
Some text
<input placeholder="input1"/>
</div>;
export {
TextSelectionEnabled,
TextSelectionDisabled
TextSelectionDisabled,
TextSelectionTabIndexEnabled,
}
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