Socket
Socket
Sign inDemoInstall

focus-lock

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-lock - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

5

dist/es2015/focusSolver.js

@@ -58,3 +58,6 @@ import { NEW_FOCUS, newFocus } from './solver';

if (newId === NEW_FOCUS) {
var focusNode = pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache));
var focusNode =
// first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache)) ||
pickAutofocus(anyFocusable, innerFocusables, allParentAutofocusables(entries, visibilityCache));
if (focusNode) {

@@ -61,0 +64,0 @@ return { node: focusNode };

@@ -43,3 +43,6 @@ import { NEW_FOCUS, newFocus } from './solver';

if (newId === NEW_FOCUS) {
const focusNode = pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache));
const focusNode =
// first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache)) ||
pickAutofocus(anyFocusable, innerFocusables, allParentAutofocusables(entries, visibilityCache));
if (focusNode) {

@@ -46,0 +49,0 @@ return { node: focusNode };

@@ -61,3 +61,6 @@ "use strict";

if (newId === solver_1.NEW_FOCUS) {
var focusNode = (0, auto_focus_1.pickAutofocus)(anyFocusable, innerTabbable, (0, parenting_1.allParentAutofocusables)(entries, visibilityCache));
var focusNode =
// first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
(0, auto_focus_1.pickAutofocus)(anyFocusable, innerTabbable, (0, parenting_1.allParentAutofocusables)(entries, visibilityCache)) ||
(0, auto_focus_1.pickAutofocus)(anyFocusable, innerFocusables, (0, parenting_1.allParentAutofocusables)(entries, visibilityCache));
if (focusNode) {

@@ -64,0 +67,0 @@ return { node: focusNode };

11

package.json
{
"name": "focus-lock",
"version": "1.3.1",
"version": "1.3.2",
"description": "DOM trap for a focus",

@@ -15,4 +15,4 @@ "main": "dist/es5/index.js",

"release": "yarn build && yarn test",
"size": "npx size-limit",
"size:report": "npx size-limit --json > .size.json",
"size": "yarn size-limit",
"size:report": "yarn --silent size-limit --json > .size.json",
"lint": "lib-builder lint",

@@ -47,4 +47,5 @@ "format": "lib-builder format",

"devDependencies": {
"@size-limit/preset-small-lib": "^2.1.6",
"@theuiteam/lib-builder": "^0.1.4"
"@size-limit/preset-small-lib": "^11.0.2",
"@theuiteam/lib-builder": "^0.1.4",
"size-limit": "^11.0.2"
},

@@ -51,0 +52,0 @@ "types": "dist/es5/index.d.ts",

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