angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.28k stars 6.71k forks source link

background should not scroll for mat-dialog if opened from mat-menu #12091

Open ghost opened 6 years ago

ghost commented 6 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The dialog background shouldn't scroll.

What is the current behavior?

The background does scroll, when mat-dialog is opened from mat-menu.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-4ljghh

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

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

@latest

Is there anything else we should know?

We use scrollstrategy "block" for mat-menu to prevent scrolling of the background when the menu is open (bug: mat-menu scroll)

jelbourn commented 6 years ago

@crisbeto I took a look at the reproduction and something does seem off.

silvioboehme commented 6 years ago

Hi! We have basically the same problem: Regarding to an other bug we changed to scroll strategy for the menu to BLOCK.

Now if you open a dialog from the menu, the scroll strategy for the dialog (which is block!) is overridden, and the page is scrolling behind the dialog. If we leave the scroll strategy for the menu to default, the dialog is working correctly.

Thank you!

ghost commented 4 years ago

Agreed with this, I just noticed it when working on a login/signup component and realizing that in tablet view the background can still scroll. A 100% width/height login on mobile is fine, a small 40%/40% is fine on desktop, but on tablet...it's not a good result.