-
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
[Feature request] MatDialog config option to disable scroll-blocking #8706
Comments
Currently we have the `MAT_DIALOG_SCROLL_STRATEGY` token which allows consumers to specify the scroll strategy for all dialogs, however there's no way do so for a single dialog. These changes add an extra property to the dialog config that allow for the scroll strategy to be set. Fixes angular#8706.
Currently we have the `MAT_DIALOG_SCROLL_STRATEGY` token which allows consumers to specify the scroll strategy for all dialogs, however there's no way do so for a single dialog. These changes add an extra property to the dialog config that allow for the scroll strategy to be set. Fixes angular#8706.
…en (#8726) Currently we have the `MAT_DIALOG_SCROLL_STRATEGY` token which allows consumers to specify the scroll strategy for all dialogs, however there's no way do so for a single dialog. These changes add an extra property to the dialog config that allow for the scroll strategy to be set. Fixes #8706.
…en (#8726) Currently we have the `MAT_DIALOG_SCROLL_STRATEGY` token which allows consumers to specify the scroll strategy for all dialogs, however there's no way do so for a single dialog. These changes add an extra property to the dialog config that allow for the scroll strategy to be set. Fixes #8706.
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:
|
You have to |
@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. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.
The text was updated successfully, but these errors were encountered: