Rayane Queiroz
Rayane Queiroz

Reputation: 3

Block scrolling when popover is opened

I'm not sure how to make the 'Popover' component of Material UI remain fixed on the screen when I open it. Because when I open the popover (https://mui.com/material-ui/react-popover/) It's not blocking the scroll and the box that appears after clicking is moving along the entire page. I don't want to keep the scroll bar visible while popover is open.

I'm using the latest version.

Image below

enter image description here

Upvotes: -1

Views: 1918

Answers (1)

MisieQQQ
MisieQQQ

Reputation: 256

You can add overflow: hidden; to body element and remove it on close :) Tho its a weird behavior in docs as in source code there is no such thing, yet it happens

Upvotes: 1

Related Questions