trap-focus-svelte
Advanced tools
Comparing version 1.1.0-rc1 to 1.1.0-rc2
@@ -56,3 +56,3 @@ let stack: HTMLElement[] = [] | ||
/** moves focus back to wrap if something outside the wrap is focused */ | ||
const focusOutListener = listen(document, 'focusin', (e: FocusEvent) => { | ||
const focusInListener = listen(document, 'focusin', (e: FocusEvent) => { | ||
// return if ths trap is not active | ||
@@ -63,2 +63,3 @@ // return if focus is inside the trap | ||
} | ||
console.log('focusin', e.target, e.relatedTarget) | ||
const [firstFocusable, lastFocusable] = getFirstAndLastFocusable() | ||
@@ -104,3 +105,3 @@ const previousFocusable = e.relatedTarget as HTMLElement | ||
// shiftTabListener() | ||
focusOutListener() | ||
focusInListener() | ||
// focusOutListener() | ||
@@ -107,0 +108,0 @@ removeFromStack() |
{ | ||
"name": "trap-focus-svelte", | ||
"version": "1.1.0-rc1", | ||
"version": "1.1.0-rc2", | ||
"license": "MIT", | ||
@@ -27,3 +27,4 @@ "description": "Small 0.4kB focus trap that supports stacking, toggling, and dynamic content. Compatible with any framework.", | ||
"require": "./dist/trap-focus-svelte.cjs", | ||
"default": "./dist/trap-focus-svelte.svelte.js" | ||
"default": "./dist/trap-focus-svelte.svelte.js", | ||
"svelte": "./dist/trap-focus-svelte.svelte.js" | ||
}, | ||
@@ -30,0 +31,0 @@ "./svelte": "./dist/trap-focus-svelte.svelte.js", |
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
12625
183