When we place button inside angular material dialog it is auto focussing first button in that modal.
Stackblitz example
You can add the autofocus = false
properties to the dialog to disable the auto focus.
Example as below:
const dialogRef = this.dialog.open(DialogOverviewExampleDialog, {
width: '250px',
data: {name: this.name, animal: this.animal},
autoFocus: false
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With