Search code examples
androidjquerymagento-1.9

Android keyboard appearing and dissapering


I'm developing an e-shop using Magento and there is a small bug in the search box on Android devices. When the user clicks on the search box, the keyboard appears and disappears after almost one second. The page uses jQuery to "capture" the id of the search box so the portion of code is as follows:

 $('#search').keyup(function () {
    #code
)};

I've tried various I saw online but it didn't work. All suggestions though lead to the fact that the keyboard looses focus. Any help would be appreciated.


Solution

  • it's becouse input lose focus. you can try to force its on your input field in jquery

    $("#search").focus()