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

react-focus-lock

Package Overview
Dependencies
Maintainers
0
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 2.13.4 to 2.13.5

9

dist/cjs/Trap.js

@@ -100,5 +100,4 @@ "use strict";

var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;
if (focusOnBody() && lastActiveFocus) {
if (focusOnBody() && lastActiveFocus && lastActiveFocus !== document.body) {
if (!document.body.contains(lastActiveFocus) || isNotFocusable(lastActiveFocus)) {
lastActiveFocus = null;
var newTarget = tryRestoreFocus();

@@ -139,5 +138,7 @@ if (newTarget) {

}
lastActiveFocus = document && document.activeElement;
if (lastActiveFocus !== document.body) {
tryRestoreFocus = (0, _focusLock.captureFocusRestore)(lastActiveFocus);
}
focusWasOutsideWindow = false;
lastActiveFocus = document && document.activeElement;
tryRestoreFocus = (0, _focusLock.captureFocusRestore)(lastActiveFocus);
}

@@ -144,0 +145,0 @@ }

@@ -92,5 +92,4 @@ import React from 'react';

var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;
if (focusOnBody() && lastActiveFocus) {
if (focusOnBody() && lastActiveFocus && lastActiveFocus !== document.body) {
if (!document.body.contains(lastActiveFocus) || isNotFocusable(lastActiveFocus)) {
lastActiveFocus = null;
var newTarget = tryRestoreFocus();

@@ -131,5 +130,7 @@ if (newTarget) {

}
lastActiveFocus = document && document.activeElement;
if (lastActiveFocus !== document.body) {
tryRestoreFocus = captureFocusRestore(lastActiveFocus);
}
focusWasOutsideWindow = false;
lastActiveFocus = document && document.activeElement;
tryRestoreFocus = captureFocusRestore(lastActiveFocus);
}

@@ -136,0 +137,0 @@ }

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

@@ -5,0 +5,0 @@ "main": "dist/cjs/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