focus-lock
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -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 }; |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184911
4395
3