Skip to content

Commit e555eae

Browse files
JasonAsmkkensodemann
authored andcommitted
fix(alert): focus input after it is ready (#13259)
Fixes: #12784
1 parent 5742540 commit e555eae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/alert/alert-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class AlertCmp {
204204
// and ionViewDidEnter is not in the same callstack as the touch event :(
205205
const focusableEle = this._elementRef.nativeElement.querySelector('input,button');
206206
if (focusableEle) {
207-
focusableEle.focus();
207+
setTimeout(() => focusableEle.focus());
208208
}
209209
this.enabled = true;
210210
}

0 commit comments

Comments
 (0)