@zag-js/tabbable
Advanced tools
Comparing version 0.0.0-dev-20240419221913 to 0.0.0-dev-20240419232104
@@ -152,3 +152,7 @@ "use strict"; | ||
event.preventDefault(); | ||
onFocus?.(elementToFocus) ?? elementToFocus.focus(); | ||
if (typeof onFocus === "function") { | ||
onFocus(elementToFocus); | ||
} else { | ||
elementToFocus.focus(); | ||
} | ||
} | ||
@@ -155,0 +159,0 @@ doc?.addEventListener("keydown", onKeyDown, true); |
{ | ||
"name": "@zag-js/tabbable", | ||
"version": "0.0.0-dev-20240419221913", | ||
"version": "0.0.0-dev-20240419232104", | ||
"description": "Small utility that returns an array of all* tabbable DOM nodes within a containing node.", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/dom-query": "0.0.0-dev-20240419221913" | ||
"@zag-js/dom-query": "0.0.0-dev-20240419232104" | ||
}, | ||
@@ -34,0 +34,0 @@ "module": "dist/index.mjs", |
@@ -52,3 +52,7 @@ import { raf } from "@zag-js/dom-query" | ||
onFocus?.(elementToFocus) ?? elementToFocus.focus() | ||
if (typeof onFocus === "function") { | ||
onFocus(elementToFocus) | ||
} else { | ||
elementToFocus.focus() | ||
} | ||
} | ||
@@ -55,0 +59,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
51679
583
+ Added@zag-js/dom-query@0.0.0-dev-20240419232104(transitive)
- Removed@zag-js/dom-query@0.0.0-dev-20240419221913(transitive)