Prevent Angular Material dialog from disabling background controls when in use

Viewed 20

I have an Angular draggable dialog and I want the user to still be able to use the website when the dialog is open (scroll, click on buttons etc.) By default, the dialog prevent background control.

Is there anyway to do this with an Angular Mat dialog? If not, what would you recommend I use instead of an Angular Mat Dialog?

I haven't included my code, just because it's a standard Angular Mat Dialog, nothing fancy, so I didn't think it necessary. But if it helps, let me know and I can add my code too.

1 Answers

Since you are using Angular Material, you can set to false the property hasBackdrop, from the docs

this.dialog.open(YourDialogComponent, { width: '320px', hasBackdrop: false})
 .afterClosed()
 .subscribe()
Related