@react-aria/focus
Advanced tools
Comparing version 3.0.0-nightly-a98da553e-241116 to 3.0.0-nightly-b3a4d6c11-241119
@@ -478,3 +478,3 @@ var $1c7f9157d722357d$exports = require("./focusSafely.main.js"); | ||
let focusedElement = ownerDocument.activeElement; | ||
if (!$a7a032acae3ddda9$var$isElementInScope(focusedElement, scopeRef.current)) return; | ||
if (!$a7a032acae3ddda9$var$isElementInChildScope(focusedElement, scopeRef) || !$a7a032acae3ddda9$var$shouldRestoreFocus(scopeRef)) return; | ||
let treeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef); | ||
@@ -496,7 +496,7 @@ if (!treeNode) return; | ||
// next element after the node to restore to instead. | ||
if ((!nextElement || !$a7a032acae3ddda9$var$isElementInScope(nextElement, scopeRef.current)) && nodeToRestore) { | ||
if ((!nextElement || !$a7a032acae3ddda9$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) { | ||
walker.currentNode = nodeToRestore; | ||
// Skip over elements within the scope, in case the scope immediately follows the node to restore. | ||
do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode(); | ||
while ($a7a032acae3ddda9$var$isElementInScope(nextElement, scopeRef.current)); | ||
while ($a7a032acae3ddda9$var$isElementInChildScope(nextElement, scopeRef)); | ||
e.preventDefault(); | ||
@@ -535,3 +535,3 @@ e.stopPropagation(); | ||
if (restoreFocus && nodeToRestore && // eslint-disable-next-line react-hooks/exhaustive-deps | ||
($a7a032acae3ddda9$var$isElementInScope(ownerDocument.activeElement, scopeRef.current) || ownerDocument.activeElement === ownerDocument.body && $a7a032acae3ddda9$var$shouldRestoreFocus(scopeRef))) { | ||
(ownerDocument.activeElement && $a7a032acae3ddda9$var$isElementInChildScope(ownerDocument.activeElement, scopeRef) || ownerDocument.activeElement === ownerDocument.body && $a7a032acae3ddda9$var$shouldRestoreFocus(scopeRef))) { | ||
// freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it | ||
@@ -538,0 +538,0 @@ let clonedTree = $a7a032acae3ddda9$export$d06fae2ee68b101e.clone(); |
@@ -463,3 +463,3 @@ import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from "./focusSafely.module.js"; | ||
let focusedElement = ownerDocument.activeElement; | ||
if (!$9bf71ea28793e738$var$isElementInScope(focusedElement, scopeRef.current)) return; | ||
if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return; | ||
let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef); | ||
@@ -481,7 +481,7 @@ if (!treeNode) return; | ||
// next element after the node to restore to instead. | ||
if ((!nextElement || !$9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current)) && nodeToRestore) { | ||
if ((!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) { | ||
walker.currentNode = nodeToRestore; | ||
// Skip over elements within the scope, in case the scope immediately follows the node to restore. | ||
do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode(); | ||
while ($9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current)); | ||
while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)); | ||
e.preventDefault(); | ||
@@ -520,3 +520,3 @@ e.stopPropagation(); | ||
if (restoreFocus && nodeToRestore && // eslint-disable-next-line react-hooks/exhaustive-deps | ||
($9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) { | ||
(ownerDocument.activeElement && $9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) { | ||
// freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it | ||
@@ -523,0 +523,0 @@ let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone(); |
{ | ||
"name": "@react-aria/focus", | ||
"version": "3.0.0-nightly-a98da553e-241116", | ||
"version": "3.0.0-nightly-b3a4d6c11-241119", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,5 +25,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/interactions": "^3.0.0-nightly-a98da553e-241116", | ||
"@react-aria/utils": "^3.0.0-nightly-a98da553e-241116", | ||
"@react-types/shared": "^3.0.0-nightly-a98da553e-241116", | ||
"@react-aria/interactions": "^3.0.0-nightly-b3a4d6c11-241119", | ||
"@react-aria/utils": "^3.0.0-nightly-b3a4d6c11-241119", | ||
"@react-types/shared": "^3.0.0-nightly-b3a4d6c11-241119", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -33,3 +33,3 @@ "clsx": "^2.0.0" | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
@@ -36,0 +36,0 @@ "publishConfig": { |
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
384033
+ Addedreact@19.0.0-rc-fb9a90fa48-20240614(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedreact@18.3.1(transitive)
Updated@react-aria/interactions@^3.0.0-nightly-b3a4d6c11-241119