@zag-js/focus-visible
Advanced tools
Comparing version 0.0.0-dev-20220605192656 to 0.0.0-dev-20220612194202
@@ -47,2 +47,5 @@ var __defProp = Object.defineProperty; | ||
hasEventBeforeFocus = true; | ||
const target = event.composedPath ? event.composedPath()[0] : event.target; | ||
if (target.matches(":focus-visible")) | ||
return; | ||
trigger("pointer", event); | ||
@@ -65,3 +68,3 @@ } | ||
function isFocusVisible() { | ||
return modality !== "pointer"; | ||
return modality === "keyboard"; | ||
} | ||
@@ -68,0 +71,0 @@ function setupGlobalFocusEvents() { |
{ | ||
"name": "@zag-js/focus-visible", | ||
"version": "0.0.0-dev-20220605192656", | ||
"version": "0.0.0-dev-20220612194202", | ||
"description": "Focus visible polyfill utility based on WICG", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Sorry, the diff of this file is not supported yet
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
19326
186