I noticed that button gets classes cdk-focused and cdk-program-focused added after the dialog it triggered is closed. If I click anywhere effect disappears.
app.component.html [fragment]
<mat-cell *matCellDef="let element">
<span matTooltip="Delete" matTooltipPosition="right">
<button mat-icon-button color="warn" (click)="openDeleteAssociationDialog()">
<mat-icon>delete</mat-icon>
</button>
</span>
</mat-cell>
<button #changeButton mat-icon-button (click)="changeItem(element)" disableRipple>
<mat-icon>edit</mat-icon>
</button>
{ ViewChild, ElementRef } from '@angular/core';
@ViewChild('changeButton') private changeButton: ElementRef;
dialogRef.afterClosed().subscribe(result => {
this.changeButton['_elementRef'].nativeElement
.classList.remove('cdk-program-focused');
}