Skip to content

[DOCS]: PopoverPanel modal incorrectly says default=true and makes others inert #3223

Closed
@david-crespo

Description

@david-crespo

This bit of the docs appears to be incorrect.

https://headlessui.com/react/popover

image

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 false

PopoverPanel does not call useOthersInert

// Ensure we close the popover as soon as the button becomes hidden
useOnDisappear(state.button, () => dispatch({ type: ActionTypes.ClosePopover }), visible)
// Enable scroll locking when the popover is visible, and `modal` is enabled
useScrollLock(ownerDocument, state.__demoMode ? false : modal && visible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions