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

[Bug] Signup Modal not mobile compatible #76

Closed
rickstaa opened this issue Feb 12, 2021 · 3 comments · Fixed by #85
Closed

[Bug] Signup Modal not mobile compatible #76

rickstaa opened this issue Feb 12, 2021 · 3 comments · Fixed by #85
Labels
bug Something isn't working

Comments

@rickstaa
Copy link

rickstaa commented Feb 12, 2021

Version

1.9.0

Reproduction link

https://demos.creative-tim.com/material-kit-pro-react/#/components

Operating System

Ubuntu 20.04, windows 10

Device

Hp Zbook G5

Browser & Version

Chrome v8.0.4324.150, firefox v85.0.1

Steps to reproduce

  1. Go to components page
  2. Click the signup modal.
  3. Open the firefox or chrome mobile view.
  4. See that the top of the modal is not visible.

What is expected?

The modal should be displayed correctly like the login modal when viewing the site using a mobile device.

What is actually happening?

The top parts of the modal are not visible.


Solution

I noticed that this issue is fixed by:

  • Removing the margin-top: 130px !important; rule on the .jss1682 class.
  • Removing the height: 100% on the .MuiDialog-container class.
@rickstaa rickstaa changed the title Signup Modal not mobile compatible [bug] Signup Modal not mobile compatible Feb 12, 2021
@rickstaa rickstaa changed the title [bug] Signup Modal not mobile compatible [Bug] Signup Modal not mobile compatible Feb 12, 2021
@einazare einazare added the bug Something isn't working label Feb 12, 2021
@einazare
Copy link
Contributor

Hey, @rickstaa ,

Thanks for this, and for the solution.
We'll add your solution on our next update.

Best,
Manu

@rickstaa
Copy link
Author

@einazare Great thanks for including the solution in the next update. Keep in mind that the solution came from a quick debugging session. It seems to work, but, I did not thoroughly test it. As a result, there might, therefore be a more suitable solution.

@rickstaa
Copy link
Author

rickstaa commented Feb 16, 2021

I now use the following in my project. I keep an eye on when your update is available.

Modal code changes

    <Dialog
      classes={{
        root: classes.modalRoot,
        paper: classes.modal + " " + classes.modalSignup,
+     container: classes.containerSignup,
      }}
      open={open}
      TransitionComponent={Transition}
      keepMounted
      onClose={onClose}
      aria-labelledby="signup-modal-slide-title"
      aria-describedby="signup-modal-slide-description"
    >

JSS changes

modalStyles.js

  modal: {
    [theme.breakpoints.up("sm")]: {
      maxWidth: "500px",
      margin: "auto",
+      marginTop: "130px !important",
    },
    borderRadius: "6px",
    overflow: "visible",
    maxHeight: "unset",
    width: "100%",
-    marginTop: "130px !important",
  },

signupModalStyles.,js

+  containerSignup: {
+   [theme.breakpoints.down("sm")]: {
+      height: "inherit", // Prevent matUI default from pushing part of model out of screen
+    },
+ },

einazare added a commit that referenced this issue May 12, 2021
Closes #82
Closes #78
Closes #76
Closes #69
Closes #49
einazare added a commit that referenced this issue May 12, 2021
Closes #82
Closes #78
Closes #76
Closes #69
Closes #49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants