-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Popover] Get broken when using an image as children #26385
Comments
Can you clarify what means broken? I can open the |
hello there @mnajdova, thanks for your comment After the first time, you will notice that the position is changed. Like if it lost its anchor element position. |
Hi @edgar-arroyo-by ) I will try to fix this |
@edgar-arroyo-by I believe that this is not a bug in material-ui but an expected behavior because of img is not loaded, so popover cannot calculate the width, after first open image is loaded so the next time you click on the button popover can calculate the width. I see 2 ways to workaround on this.
|
hello there @siriwatknp you are completely right, thank you a lot for your response! |
@siriwatknp It's also related to #22519. Assuming we rewrite |
Current Behavior 😯
After opening the popover twice, if its children is an image, it get broken.
Expected Behavior 🤔
After opening the popover twice, it continue working properly when having an image as a children
Steps to Reproduce 🕹
https://codesandbox.io/s/material-demo-forked-osozn?file=/demo.tsx
Steps:
Context 🔦
Just want to show an image inside a popover
The text was updated successfully, but these errors were encountered: