-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Always-on scroll breaks Modal padding #1409
Comments
After viewing the code sandbox link and trying in a local project I am not able to reproduce this issue. This may be an issue in your application itself as there may be some other custom css you have causing this issue. |
I have tried this in the sandbox link, so perhaps it is OS and browser dependent. I am using Ubuntu 18.10 and Chrome. |
Edit: Sorry, the above example works and removes the padding correctly. But with a few tweaks it breaks. Opening 2 consecutive modals in a row produces the Tested on Windows 10 with Chromium Edge 86.0.587.0, Google Chrome Version 84.0.4147.105 and Firefox 78.0.2 See & reproduce here: https://stackblitz.com/edit/reactstrap-j6vjaz I'm pretty sure it has something to do with the position of this line: Line 301 in aa63f99
It remembers only the last padding, but if the last padding was already altered by a previous modal it'll be wrong. It should only do it when there is no open modal, e.g. Hope this helps. /ping @GoPro16 |
Modal
7.1.0
umd
, not full16.8.1
4.2.1
What is happening?
I set
overflow-y: scroll
on my<body>
tag to prevent an appearing scrollbar from moving my content. Unfortunately, it seems thatModal
does not take this in to account, and attempts to add padding to compensate for a disappearance that never occurs, since it does not unsetoverflow-y: scroll
and the scrollbar remains.What should be happening?
I'm not sure if
Modal
should simply not add the padding in this case, or if it should unsetoverflow-y: scroll
and restore it later, but one of these two things needs to happen.Steps to reproduce issue
overflow-y: scroll
to<body>
Modal
usingreactstrap
.Code
Click open/close the modal and watch the div box.
https://stackblitz.com/edit/reactstrap-4rasul?file=index.html
The text was updated successfully, but these errors were encountered: