Skip to content

Commit b3f4616

Browse files
authored
Bugfix/focustrap-on-listbox (#2077)
1 parent f1fa479 commit b3f4616

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/empty-trees-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@skeletonlabs/skeleton": patch
3+
---
4+
5+
bugfix: fixed focusTrap escaping hidden inputs

packages/skeleton/src/lib/actions/FocusTrap/focusTrap.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Action: Focus Trap
22
export function focusTrap(node: HTMLElement, enabled: boolean) {
3-
const elemWhitelist = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
3+
const elemWhitelist =
4+
'a[href]:not([tabindex="-1"]), button:not([tabindex="-1"]), input:not([tabindex="-1"]), textarea:not([tabindex="-1"]), select:not([tabindex="-1"]), details:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])';
45
let elemFirst: HTMLElement;
56
let elemLast: HTMLElement;
67

0 commit comments

Comments
 (0)