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

trap-focus-svelte

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trap-focus-svelte - npm Package Compare versions

Comparing version 1.1.0-rc1 to 1.1.0-rc2

5

index.ts

@@ -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",

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