davidjbradshaw / iframe-resizer-react

The official React interface for Iframe-Resizer

Home Page:https://iframe-resizer.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work properly with Material UI (example attached)

dmitryy opened this issue · comments

I'm trying to use it with MUI v5. When you have a high page with the Select component, the iframe resized correctly but when you click on the select, it always jumps to the top. Probably material UI resizes the body somehow and it forces height calculation. I've prepared an example:

https://dmitryy.github.io/iframe-resizer-react-mui/ (try to click the latest component and you will see page jumps to the top)

  1. src of the iframe page - https://github.com/dmitryy/iframe-resizer-react-mui/blob/main/src/App.tsx
  2. src of the content page - https://github.com/dmitryy/iframe-resizer-react-content/blob/main/src/App.tsx

Sorry guys, looks like it's not about iframe-resizer-react component. If replace it with regular iframe tag, I have the same behaviour. It must be something with Material UI.
Closing this issue.