From 81d3ebe065d6dd19f00b74570cde4b5919e9cea8 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 19 Oct 2023 13:12:09 +0200 Subject: [PATCH] MOBILE-4362 core: Improve autoFocus animation --- src/core/directives/auto-focus.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/directives/auto-focus.ts b/src/core/directives/auto-focus.ts index d84252ad6..48071cd1b 100644 --- a/src/core/directives/auto-focus.ts +++ b/src/core/directives/auto-focus.ts @@ -49,6 +49,10 @@ export class CoreAutoFocusDirective implements AfterViewInit { await CoreDom.waitToBeInDOM(this.element); + // Wait in case there is an animation to enter the page, otherwise the interaction + // between the keyboard appearing and the animation causes a visual glitch. + await CoreUtils.wait(540); + CoreDomUtils.focusElement(this.element); }