Skip to content

Commit

Permalink
Ensure the Popover.Panel is clickable without closing the Popover (
Browse files Browse the repository at this point in the history
…#1443)

* ensure the `Popover.Panel` is clickable without closing

* update changelog
  • Loading branch information
RobinMalfait committed May 13, 2022
1 parent e1ee36a commit 9a39fc3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ignore `Escape` when event got prevented in `Dialog` component ([#1424](https://github.com/tailwindlabs/headlessui/pull/1424))
- Improve `FocusTrap` behaviour ([#1432](https://github.com/tailwindlabs/headlessui/pull/1432))
- Simplify `Popover` Tab logic by using sentinel nodes instead of keydown event interception ([#1440](https://github.com/tailwindlabs/headlessui/pull/1440))
- Ensure the `PopoverPanel` is clickable without closing the `Popover` ([#1443](https://github.com/tailwindlabs/headlessui/pull/1443))

## [Unreleased - @headlessui/react]

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ let Panel = forwardRefWithAs(function Panel<TTag extends ElementType = typeof DE
ref: panelRef,
id: state.panelId,
onKeyDown: handleKeyDown,
tabIndex: -1,
}

let direction = useTabDirection()
Expand Down
1 change: 1 addition & 0 deletions packages/@headlessui-vue/src/components/popover/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ export let PopoverPanel = defineComponent({
ref: api.panel,
id: api.panelId,
onKeydown: handleKeyDown,
tabIndex: -1,
}

return h(Fragment, [
Expand Down

0 comments on commit 9a39fc3

Please sign in to comment.