Skip to content
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] Scroll when modal is higher than viewport #11969

Closed
2 tasks done
patrykgulas opened this issue Jun 25, 2018 · 4 comments
Closed
2 tasks done

[Modal] Scroll when modal is higher than viewport #11969

patrykgulas opened this issue Jun 25, 2018 · 4 comments
Labels
component: modal This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@patrykgulas
Copy link

patrykgulas commented Jun 25, 2018

When I make modal that is higher than viewport it is cut from top and bottom and I can't scroll body to see its content. Is it possible to make it scrollable?

  • This is a v1.x issue (v0.x is no longer maintained).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When modal is higher than viewport we should be able to scroll the page.

Current Behavior

Modal is cut from top and bottom and it can't be scrolled.

Steps to Reproduce (for bugs)

https://j7qmo6oxx5.codesandbox.io/

Context

Your Environment

Tech Version
Material-UI v1.2.1
React v16.3.0
browser Google Chrome
@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Jun 25, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 25, 2018

@pgvlas I'm closing as a duplicate of #7438. Thanks for the reproduction!

@oliviertassinari
Copy link
Member

I think that we will keep the Modal as naked as possible. Regarding the Dialog, the content will scroll by default: https://codesandbox.io/s/2x7y5r3510.

@oliviertassinari oliviertassinari added the component: modal This is the name of the generic UI component, not the React module! label Apr 5, 2020
@baymac
Copy link

baymac commented May 31, 2020

@oliviertassinari Can you tell what is purpose of keeping Modal naked when it is unable to scroll when viewport is lower than its height? Is there a way to make this scrollable behaviour in Modal itself? I would like to use Modal bcz you can define height and width while in Dialog it is not possible to do so.

@oliviertassinari
Copy link
Member

@baymac The idea would be to either copy style from the Dialog component and apply it on the Modal, or customize the Dialog to reach your desired outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants