Skip to content

Commit 9a39fc3

Browse files
authored
Ensure the Popover.Panel is clickable without closing the Popover (#1443)
* ensure the `Popover.Panel` is clickable without closing * update changelog
1 parent e1ee36a commit 9a39fc3

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Ignore `Escape` when event got prevented in `Dialog` component ([#1424](https://github.com/tailwindlabs/headlessui/pull/1424))
1414
- Improve `FocusTrap` behaviour ([#1432](https://github.com/tailwindlabs/headlessui/pull/1432))
1515
- Simplify `Popover` Tab logic by using sentinel nodes instead of keydown event interception ([#1440](https://github.com/tailwindlabs/headlessui/pull/1440))
16+
- Ensure the `PopoverPanel` is clickable without closing the `Popover` ([#1443](https://github.com/tailwindlabs/headlessui/pull/1443))
1617

1718
## [Unreleased - @headlessui/react]
1819

@@ -22,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2223
- Ignore `Escape` when event got prevented in `Dialog` component ([#1424](https://github.com/tailwindlabs/headlessui/pull/1424))
2324
- Improve `FocusTrap` behaviour ([#1432](https://github.com/tailwindlabs/headlessui/pull/1432))
2425
- Simplify `Popover` Tab logic by using sentinel nodes instead of keydown event interception ([#1440](https://github.com/tailwindlabs/headlessui/pull/1440))
26+
- Ensure the `Popover.Panel` is clickable without closing the `Popover` ([#1443](https://github.com/tailwindlabs/headlessui/pull/1443))
2527

2628
## [@headlessui/react@1.6.1] - 2022-05-03
2729

packages/@headlessui-react/src/components/popover/popover.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ let Panel = forwardRefWithAs(function Panel<TTag extends ElementType = typeof DE
689689
ref: panelRef,
690690
id: state.panelId,
691691
onKeyDown: handleKeyDown,
692+
tabIndex: -1,
692693
}
693694

694695
let direction = useTabDirection()

packages/@headlessui-vue/src/components/popover/popover.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ export let PopoverPanel = defineComponent({
614614
ref: api.panel,
615615
id: api.panelId,
616616
onKeydown: handleKeyDown,
617+
tabIndex: -1,
617618
}
618619

619620
return h(Fragment, [

0 commit comments

Comments
 (0)