delay to show keyboard after invoking Element.focus()
CodeWithOz opened this issue · 0 comments
There's a delay that occurs between when I invoke someDomNode.focus()
and when the keyboard's show
event is triggered (i.e. when the keyboard itself shows). I've included a performance trace from chrome dev tools to show this.
The orange rectangle on the left edge is when the touchstart event fires, the blue rectangle is when the click event fires (which is when I invoke node.focus()
), and the green is when the keyboard's show event fires. It's usually around 0.5s between the .focus()
invocation and the keyboard showing, plus the ~200-300ms it takes to register the click. So it's close to 1s in theory, and in reality it feels like at least 1s between touching the screen and the keyboard showing. Is there something I can do about this? Why the ~500ms before the keyboard comes up? This happens on both higher end and lower end mobile devices.