Since @angular/material@5.0.0-rc.1
there is special option autoFocus on MatDialogConfig
/** Whether the dialog should focus the first focusable element on open. */
autoFocus?: boolean = true;
So you can use it as follows:
let dialogRef = this.dialog.open(ContactPersonEditComponent, {
width: '250px',
data: {
data : Object.assign({},data),
},
autoFocus: false <============================== this line
});