-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 opening moves body up #7390
Comments
Can you reproduce by forking this? https://plnkr.co/edit/MGU2aYrB3R1SkrTUCFEZ?p=preview |
Sure, never used plunker so I'm not sure if I did the right thing, but here you go : https://plnkr.co/edit/EuKloJ9RX6VlcIizaJCR?p=preview |
Thanks! Looks like this is due to the scroll blocking strategy that the dialog uses. It calculates the scrolltop and fixes the If you care where the long gray bar is positioned vertically, then I think you should be specifying a |
Thanks a lot, I'll see if I find a temporary workaround :) |
As @willshowell mentioned, it's because you haven't set a |
@willshowell @crisbeto : Could you specify which element we need to add |
Here you can see where to add that style. |
When I debug what I found was cdk-global-scrollback is the class which is making the header and scroll-buttons to disapper. So In that case I just removed calling that class from that particular component. Eg: document.getElementsByTagName('html')[0].classList.remove('cdk-global-scrollblock'); Adding that code should fix it. |
+1 I fixed it like this
|
I faced same problem.
Put it into your global css or in dialog components loacl css (you have to enable view encapsulation in case of local) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Opening a modal does not moves body up.
What is the current behavior?
A negative
top
is applied to the body, causing elements to go up. This comes back to normal when closing the modalWhat are the steps to reproduce?
position: fixed
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Tested on chrome 61
Win / Mac / Linux
Is there anything else we should know?
❤️
The text was updated successfully, but these errors were encountered: