[Feature request] MatDialog config option to disable scroll-blocking
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
A config option to disable the scroll-blocking behavior of a dialog (so that the underlaying page could be used as without the dialog)
What is the current behavior?
There's an option to disable to backdrop hasBackdrop but the underlaying site still isn't scrollable (but clickable though)
What is the use-case or motivation for changing an existing behavior?
With this feature it would be possible to "pin" a dialog like gmails compose-email window.
Help me please to find some explanation how to set scroll strategy for MatDialog in configs.
You can pass it in as an option when you open the dialog @Adrian1907:
constructor(public dialog: MatDialog, overlay: Overlay) {
dialog.open(JazzDialog, {
scrollStrategy: overlay.scrollStrategies.noop()
});
}
@crisbeto Does it require any imports? My editor tells me:
Cannot find name 'overlay'
You have to import {Overlay} from '@angular/cdk/overlay';.
@crisbeto Thanks, now it works!
Please note: For iOS Safari, when opening a dialog the browser chrome will reappear if previously hidden (due to this css class changing the scroll position + making it position: fixed). This same code will prevent the chrome from appearing - which can be a bad and 'jumpy' user experience.
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.