Skip to Content

๊Unable to set focus on iOS Device

Hi experts,

I found a problem when tried to set focus on iOS Devices.

https://imgur.com/a/AQ6RAZL

as you see in the link above when I call focus() the keyboard will immediately disappears and then lost the focus. It will focus on the input just a few millisecond. Only one way to make it works is hold the button for 1-2 second before call set focus.

I also tried other solutions such as mouse click simulation, set a delay and it still didn't work.

This problem only occurs on iOS device but on Android , Window and Browser (Not on iOS) are work fine.

Best Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 23 at 09:10 AM

    Hi

    I already found the solution.

    Just need to set attr "tabindex" to input before set focus like

    jQuery('__xmlview0--__input1-inner').context.activeElement.setAttribute('tabindex',0);

    problem is solved

    Best Regards,

    Add comment
    10|10000 characters needed characters exceeded