-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Component (if applicable)
- URL: https://catalyst.tailwindui.com/docs/dialog#with-scrolling-content
- Component: Dialog (with scrolling content)
Describe the bug
In the “With scrolling content” Dialog example, clicking/dragging the browser/page scrollbar while the dialog is open causes the dialog to close. It looks like the scrollbar interaction is being treated as an outside click and triggers onClose.
To Reproduce
- Go to https://catalyst.tailwindui.com/docs/dialog#with-scrolling-content
- Open the “Terms and conditions” dialog
- Instead of scrolling inside the dialog, click and drag the browser’s right scrollbar (page scrollbar)
- Release the mouse → the dialog closes
Expected behavior
Dragging/clicking the browser/page scrollbar should not close the dialog. Only an intentional outside click (on the backdrop) or Escape should close it.
Actual behavior
Dialog closes on scrollbar drag/release, as if an outside click happened.
Browser/Device
- OS: macOS
- Browser: Firefox
Additional context
We are using the Catalyst template in our app as well, and we can reproduce the exact same behavior there (Headless UI Dialog). So this is not only the docs site — it affects real Catalyst-based apps too.