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(dialog): opening a dialog, scrolls my page to the top. #1633

Closed
ericjim opened this issue Oct 27, 2016 · 2 comments · Fixed by #1661
Closed

bug(dialog): opening a dialog, scrolls my page to the top. #1633

ericjim opened this issue Oct 27, 2016 · 2 comments · Fixed by #1661
Assignees

Comments

@ericjim
Copy link
Member

ericjim commented Oct 27, 2016

Bug, feature request, or proposal:

Bug.

What is the expected behavior?

Whenever I open a dialog, my page scrolls to the top.

What is the current behavior?

I would like my dialog to be instantiated at the center of what is currently in view.

What are the steps to reproduce?

Create a page with a long list, and open a dialog while at the bottom of the list.

What is the use-case or motivation for changing an existing behavior?

I would like to have a list, where each entry can produce a dialog.

Which versions of Angular, Material, OS, browsers are affected?

Angular 2.1.0, @angular/material": "2.0.0-alpha.9-3, Chrome 54

Is there anything else we should know?

<3

@crisbeto
Copy link
Member

For future reference, this is caused by the .md-overlay-container being absolutely positioned. Switching it to fixed will fix it. It probably wasn't noticed, because all of the scrollable content in the demo app is within a position: fixed element.

crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 31, 2016
Fixes the overlay not taking up the entire viewport if the `body` is scrollable.

Fixes angular#1633.
jelbourn pushed a commit that referenced this issue Nov 3, 2016
)

Fixes the overlay not taking up the entire viewport if the `body` is scrollable.

Fixes #1633.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants