Skip to content

Commit

Permalink
Merge pull request #15979 from kubedan/15978
Browse files Browse the repository at this point in the history
Fixed #15978 - Doesn't call this.focus infinitely.
  • Loading branch information
cetincakiroglu authored Jul 11, 2024
2 parents 08860d0 + 93da67f commit a34178c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy {
this.zone.runOutsideAngular(() => {
setTimeout(() => focusableElement.focus(), timeoutDuration || 5);
});
} else if (this.footerViewChild) {
} else if (this.footerViewChild && focusParentElement !== this.footerViewChild.nativeElement) {
// If the content section is empty try to focus on footer
this.focus(this.footerViewChild.nativeElement);
}
Expand Down

0 comments on commit a34178c

Please sign in to comment.