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

Opening modal causes page to shift #945

Closed
skitterm opened this issue Apr 17, 2018 · 4 comments
Closed

Opening modal causes page to shift #945

skitterm opened this issue Apr 17, 2018 · 4 comments
Assignees

Comments

@skitterm
Copy link
Contributor

On Windows Chrome, when I open a modal, the page scrollbar goes away and the page shifts ~20px to the right. Otherwise the experience of the modal fading in and up is smooth, but it feels janky when the page shifts quickly underneath it (and then back over when the modal is dismissed).

Would it be possible to keep the scrollbar but still disallow scrolling? Or alternatively, a solution like Bootstrap 4: they remove the scrollbar but the page does not shift: https://getbootstrap.com/docs/4.1/components/modal/

@paulcpederson paulcpederson self-assigned this Apr 18, 2018
@paulcpederson
Copy link
Member

Yes, this should be possible with some changes to the _reset styles on the html element. The Bootstrap example puts their overflow property on the body element, which I think we should move to. Marking as bug.

@paulcpederson
Copy link
Member

Note to self:

  • remove overflow-y: scroll from html tag (and height: 100%?)
  • apply drawer-no-overflow to body instead of html tag

@paulcpederson
Copy link
Member

Will be fixed on next release

@skitterm
Copy link
Contributor Author

Awesome, thanks @paulcpederson!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants