From 95cb6107bb5eaa8b4137634d60d969ec0cdc2248 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 30 Apr 2024 10:35:03 -0400 Subject: [PATCH 1/3] Only check for elements in useInertOthers --- packages/@headlessui-react/src/hooks/use-inert-others.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@headlessui-react/src/hooks/use-inert-others.tsx b/packages/@headlessui-react/src/hooks/use-inert-others.tsx index 7f96149dad..6d8e54165e 100644 --- a/packages/@headlessui-react/src/hooks/use-inert-others.tsx +++ b/packages/@headlessui-react/src/hooks/use-inert-others.tsx @@ -103,7 +103,7 @@ export function useInertOthers( let parent = element.parentElement while (parent && parent !== ownerDocument.body) { // Mark all siblings as inert - for (let node of parent.childNodes) { + for (let node of parent.children) { // If the node contains any of the elements we should not mark it as inert // because it would make the elements unreachable. if (allowedElements.some((el) => node.contains(el))) continue From 8ce7cd12cc7fc37fb7215c4adef18b2412d2013b Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 30 Apr 2024 10:37:37 -0400 Subject: [PATCH 2/3] Update changelog --- packages/@headlessui-react/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@headlessui-react/CHANGELOG.md b/packages/@headlessui-react/CHANGELOG.md index d7e736289f..7b7f5f114d 100644 --- a/packages/@headlessui-react/CHANGELOG.md +++ b/packages/@headlessui-react/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `overflow: auto` when using the `anchor` prop ([#3138](https://github.com/tailwindlabs/headlessui/pull/3138)) - Ensure `TransitionRoot` component without props transitions correctly ([#3147](https://github.com/tailwindlabs/headlessui/pull/3147)) - Ensure the `static` and `portal` props work nicely together ([#3152](https://github.com/tailwindlabs/headlessui/pull/3152)) +- Only check for elements in useInertOthers ([#3154](https://github.com/tailwindlabs/headlessui/pull/3154)) ### Changed From 7bc8984d921582eae04ba7f0a4d8dbcb0ac3aabb Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Tue, 30 Apr 2024 10:40:22 -0400 Subject: [PATCH 3/3] Update packages/@headlessui-react/CHANGELOG.md --- packages/@headlessui-react/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@headlessui-react/CHANGELOG.md b/packages/@headlessui-react/CHANGELOG.md index 7b7f5f114d..68ca3441ff 100644 --- a/packages/@headlessui-react/CHANGELOG.md +++ b/packages/@headlessui-react/CHANGELOG.md @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `overflow: auto` when using the `anchor` prop ([#3138](https://github.com/tailwindlabs/headlessui/pull/3138)) - Ensure `TransitionRoot` component without props transitions correctly ([#3147](https://github.com/tailwindlabs/headlessui/pull/3147)) - Ensure the `static` and `portal` props work nicely together ([#3152](https://github.com/tailwindlabs/headlessui/pull/3152)) -- Only check for elements in useInertOthers ([#3154](https://github.com/tailwindlabs/headlessui/pull/3154)) +- Only check for elements in `useInertOthers` ([#3154](https://github.com/tailwindlabs/headlessui/pull/3154)) ### Changed