-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Bug in isOverflowing? #12386
Comments
Hum, I not too familiar with this logic, I would need to test it out but what we currently have looks very wrong. |
No, we don't have this wrong. This is to check that the body is overflowing vertically. |
@jasontrigg0 Are you still having this issue? Could you provide a demo? |
Thanks for the response, that makes sense. Looking into my issue a bit more I'm seeing the following when a modal is opened:
Does this make sense? Do you know why (1) might be happening? Can work on pulling out a minimal example if this isn't clear. |
Can you tell me why it happens to you but not when I open a modal on the documentation site? |
@jasontrigg0 I gave the logic a second look. It's all right. I have forgotten that I added the Could you please provide a full reproduction? On codesandbox would be great. |
Example: https://codesandbox.io/s/3x00l11jpq I think the key factor is that the modal has the container prop, and isOverflowing(container) is (incorrectly?) returning true here: which is perhaps caused by this line evaluating as false? Let me know! |
@jasontrigg0 I confirm the issue. The issue starts with this property: <Modal container={document.getElementById("test")} /> What's your use case for this property? |
We're using this toolbar component, which creates a Popover with a container: |
Any progress on this? |
The logic was changed in: #14877. It should be better now. |
Hello,
I was having an issue similar to #10000 and found the following line in isOverflowing.js
Is the sign backwards here? Flipping it solved my problem.
https://github.com/mui-org/material-ui/blob/5eee984cbe4f39f793573354ff170757f37d65cc/packages/material-ui/src/Modal/isOverflowing.js#L24
The text was updated successfully, but these errors were encountered: