Skip to content

Commit 26e1644

Browse files
authored
Add overflow: auto when using the anchor prop (#3138)
1 parent 8c7cbb3 commit 26e1644

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/@headlessui-react/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- Ensure anchored components are always rendered in a stacking context ([#3115](https://github.com/tailwindlabs/headlessui/pull/3115))
2727
- Add optional `onClose` callback to `Combobox` component ([#3122](https://github.com/tailwindlabs/headlessui/pull/3122))
2828
- Make sure `data-disabled` is available on virtualized options in the `Combobox` component ([#3128](https://github.com/tailwindlabs/headlessui/pull/3128))
29+
- Add `overflow: auto` when using the `anchor` prop ([#3138](https://github.com/tailwindlabs/headlessui/pull/3138))
2930

3031
### Changed
3132

packages/@headlessui-react/src/internal/floating.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ export function FloatingProvider({
314314
sizeMiddleware({
315315
apply({ availableWidth, availableHeight, elements }) {
316316
Object.assign(elements.floating.style, {
317+
overflow: 'auto',
317318
maxWidth: `${availableWidth - padding}px`,
318319
maxHeight: `${availableHeight - padding}px`,
319320
})

0 commit comments

Comments
 (0)