Skip to content

[docs][material-ui] Popover docs seem somewhat misleading regarding "click away" #39973

@vilbergs

Description

@vilbergs

Duplicates

  • I have searched the existing issues

Related page

https://mui.com/material-ui/react-popover/

Kind of issue

Unclear explanations

Issue description

I am in the process of deciding between the Popover and Popper components. In the Popover documentation the following statement is made at the very beginning of the document:

  • The scroll and click away are blocked unlike with the Popper component.

However, when it comes to the "click away" part, it seems to be the opposite, i.e. click away is not blocked in Popover and it is blocked in Popper.

The Popper docs make these statements:

  • The scroll isn't blocked like with the Popover component. The placement of the popper updates with the available area in the viewport.
  • Clicking away does not hide the Popper component. If you need this behavior, you can use ClickAwayListener - see the example in the menu documentation section.

This leads me to believe that the point in the Popover docs should be remedied to the following (or similar):


Things to know when using the Popover component:

  • The component is built on top of the Modal component.
  • Scrolling is blocked unlike with the Popper component.

Or, if a diff is more helpful:

Things to know when using the `Popover` component:
...
- - The scroll and click away are blocked unlike with the [`Popper`](/material-ui/react-popper/) component.
+ - Scrolling is blocked unlike with the [`Popper`](https://mui.com/material-ui/react-popper/) component."

I'm happy to submit a PR for this, but I'm not sure that I've fully understood the desired behaviour. I'd be happy if someone can confirm.

Context 🔦

I am in the process of deciding between the Popover and Popper components. I need to implement a feature where an alert pops up on a table row when it conflicts with the data (new row) that the user is attempting to add.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: PopoverThe React component.docsImprovements or additions to the documentation.scope: popupChanges related to the popup.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions