[Bug] Listbox cause unexpected scroll behavior when it is used with a `position: sticky` container
See original GitHub issueWhat package within Headless UI are you using?
What version of that package are you using?
v1.6.1
What browser are you using?
Chrome: Version 101.0.4951.64 (Official Build) (arm64)
Reproduction URL https://codesandbox.io/s/headlessui-react-unexpected-scroll-behavior-9jvger?file=/src/App.js
Describe your issue
Listbox cause unexpected scroll behavior when it is used with a position: sticky
container
https://www.npmjs.com/package/scroll-into-view-if-needed might be a good choice to solve this problem.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Scrolling bug when focusing element inside position sticky ...
I've created sticky scroll-spy navigation for the page, but there's weird behavior when user focus link or checkbox. This bug only occurs ...
Read more >How to Fix Issues With CSS Position Sticky Not Working?
This happens because the sticky element is meant to stick/scroll within the height of a container.
Read more >All Products v16.1 HF1 - Fixed bugs - 4D
ACI0096136, When setting the Horizontal Sizing option of a list box ... listbox, when scroll at one line by using command OBJECT SET...
Read more >dL4Term Terminal Emulator 10.1.4 Maintenance Release
causes a list box to send the associated string whenever the user scrolls to the last item in the list box. An application...
Read more >Enhancements and Resolved Issues - Evisions Help
Release Area Issue Number
6.9.1 Accessibility AR‑7645
6.9.1 AWV AR‑7632
6.9.1 AWV AR‑7633
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm I’m on basically the exact same versions as you are:

And I can’t reproduce it at all. Do you have any extensions installed that could cause an issue? Can you check in incognito mode or another browser by any chance? Do you have any special system wide settings enabled?
https://user-images.githubusercontent.com/1834413/169120701-494813c3-9d73-4287-9b02-a2360b5b599c.mov