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

fix: vertical scrolling after opening the Mobile paring modal #1295

Merged
merged 9 commits into from
Dec 6, 2022

Conversation

metadiver
Copy link
Contributor

@metadiver metadiver commented Dec 1, 2022

What it solves

Resolves #1281

How this PR fixes it

QRModal.ts manual handling of the Dialog is conflicting with mui's ModalManager, this PR is a workaround to remove the body styles manually after the modal is closed.

How to test it

Analytics changes

Screenshots

CLA

With the submission of this Pull Request, I confirm that I have read and agree to the terms of the Contributor License Agreement.

@katspaugh
Copy link
Member

The code looks good, thanks @metadiver!

We're atm setting up a contributor agreement action, please give us some time to properly configure it, and then we can accept your PR. Cheers!

@katspaugh katspaugh changed the title chore: fix vertical scrolling after opening the Mobile paring modal fix: vertical scrolling after opening the Mobile paring modal Dec 2, 2022
Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way I found that works is to change the Dialog to be a controlled component i.e. have a state for open and call setOpen(false) when closing the modal. This seems to trigger MUIs logic to remove the overflow property from the body.

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@metadiver
Copy link
Contributor Author

thank you!

@katspaugh
Copy link
Member

@metadiver could you please add this to the PR description?

With the submission of this Pull Request, I confirm that I have read and agree to the terms of the [Contributor License Agreement](https://safe.global/cla/).

Thanks!

@katspaugh katspaugh merged commit edce31f into safe-global:dev Dec 6, 2022
@gitpoap-bot
Copy link

gitpoap-bot bot commented Dec 6, 2022

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2022 Safe Web Core Contributor:

GitPOAP: 2022 Safe Web Core Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@katspaugh katspaugh mentioned this pull request Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Vertical Scrolling] - Opening the Mobile paring modal breaks the scrolling of the page
3 participants