-
Notifications
You must be signed in to change notification settings - Fork 42
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
Modal: fix overflow on mobile when content too large #1066
Conversation
Co-authored-by: Mayank <[email protected]>
…hub.com/iTwin/iTwinUI into annie/resizable-dialogue-min-height-set
This reverts commit b0f359b.
I pulled this branch locally and ran it in the iOS Simulator to investigate. I think part of the reason we're facing this issue is because the default dialog does not have @mixin iui-dialog {
+ display: flex;
+ flex-direction: column;
...
}
@mixin iui-dialog-content {
…
- max-height: 70vh;
} If we add that, we could then remove those duplicated lines within However, I think there was a reason we didn't do this. Would changing the default dialog from |
@FlyersPh9 See above where I said:
|
…com/iTwin/iTwinUI into annie/phone-modal-display-too-large
Changes
Added max-height to
iui-dialog-content
because the content was going out of screen/overflow for smaller screens.This is not a complete PR. The issue with setting max-height for dialog content is that in the case of full screen, it would affect the position of the buttons, because they are placed below the content and not relative to the full page (I might be overthinking this and that it is on the user to place their buttons to the right position...)
Alternatively, I tried setting max-height to inherit instead, which I think makes sense to have content min-height inherit from parents which is the dialog box that contains it, and that works for full screen. However because the content position is a bit below the dialog box, this is what happens
So a possible solution would be to do something like max-height: inherit - 20px, basically says content max-height is whatever the parent (dialog container) max-height is, but a bit smaller. But
inherit - something
is not a thing. Is something equivalence to that?closes #425
Testing
Docs