Search code examples
javascriptioscordova

Hiding ios keyboard in Cordova. Is it possible?


I am using cordova 3.4.0 and I would like to hide the keyboard once the ajax call did the job on search. I would like to avoid users to press "done" to hide de keyboard and see the result.


Solution

  • When you execute the ajax call, try this :

    document.activeElement.blur();
    

    With this you lose focus on the current element and the keyboard disappear.