Why do the fixed positioned elements move when a modal is opened?

Posted by Andre Scott | Updated on

Scrolling is blocked as soon as a modal is opened. This prevents interacting with the background when the modal should be the only interactive content.

However, removing the scrollbar can make your fixed positioned elements move. In this situation, you can apply a global .mui-fixed class name to tell Material-UI to handle those elements.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers