From ef3046b9f1e2c77b41ffdbab159237c7e249789a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:33:30 +0300 Subject: [PATCH] Fixed #15335 - Dropdown | Focus lost after using tab to select dropdown item --- src/app/components/dropdown/dropdown.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/components/dropdown/dropdown.ts b/src/app/components/dropdown/dropdown.ts index c12794aaace..2954d1e00e4 100755 --- a/src/app/components/dropdown/dropdown.ts +++ b/src/app/components/dropdown/dropdown.ts @@ -1438,10 +1438,14 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV } if (isFocus) { if (this.focusInputViewChild) { - DomHandler.focus(this.focusInputViewChild?.nativeElement); + setTimeout(() => { + DomHandler.focus(this.focusInputViewChild?.nativeElement); + }); } if (this.editable && this.editableInputViewChild) { - DomHandler.focus(this.editableInputViewChild?.nativeElement); + setTimeout(() => { + DomHandler.focus(this.editableInputViewChild?.nativeElement); + }); } } this.cd.markForCheck();