diff --git a/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.html b/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.html index dff9a1d27f..b5a438ae14 100644 --- a/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.html +++ b/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.html @@ -1,5 +1,6 @@ @if (canShowDialog()) {
| undefined; /** Dialog direction. Can be 'ltr' or 'rtl. */ private direction: Direction = 'ltr'; @@ -70,11 +72,11 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { /** Makes the dialog always visible even when there are no uploads. */ @Input() - alwaysVisible: boolean = false; + alwaysVisible = false; /** Emitted when a file in the list has an error. */ @Output() - error: EventEmitter = new EventEmitter(); + error = new EventEmitter(); @HostBinding('attr.adfUploadDialogRight') public get isPositionRight(): boolean { @@ -98,10 +100,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { ngOnInit() { this.dialogActive.pipe(delay(100), takeUntilDestroyed(this.destroyRef)).subscribe(() => { - const element: any = this.elementRef.nativeElement.querySelector('#upload-dialog'); - if (element) { - element.focus(); - } + this.uploadDialogRef?.nativeElement?.focus(); }); this.uploadService.queueChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((fileList) => {