You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether to enable accessibility features like scroll locking and focus trapping.
Looking at the code, it only does scroll locking. It doesn't make anything inert. It doesn't prevent interaction outside the popover. And it definitely doesn't focus trap; you can tab out of the popover to close it.
Calling this option modal is very misleading. It doesn't do what is expected, or even what the HUI Dialog component does.
Related, the focus option docs currently say:
This will force focus inside the PopoverPanel when the popover is open. It will also close the popover if focus left this component.
Taken literally those sentences contradict each other. I believe it should be when the popover is opened. Critical distinction.
This bit of the docs appears to be incorrect.
https://headlessui.com/react/popover
Based on the description of #3124 both of the following are intentional, so the fix would be to the docs rather than the code.
modal
defaults to falseheadlessui/packages/@headlessui-react/src/components/popover/popover.tsx
Line 815 in 045f2bc
PopoverPanel
does not calluseOthersInert
headlessui/packages/@headlessui-react/src/components/popover/popover.tsx
Lines 857 to 861 in 045f2bc
The text was updated successfully, but these errors were encountered: