input focus in jquery mobile, but keyboard doesn't appear

Taewan Hwang picture Taewan Hwang · Oct 29, 2011 · Viewed 30.1k times · Source

I'm using jquery,jquery mobile and phonegap. I want to show the keyboard one this page with input type="text".

    <section id="page1" data-role="page">
        <header data-role="header">
            <h1>jQuery Mobile</h1>
        </header>
        <div data-role="content" class="content">

            <input type="text" placeholder="입력하세요" />
        </div>

    </section>

and my script is

        $(document).ready(function(){
            $('input').select();
            $('input').focus();
        });

The text field is focused but the keyboard is not show, and It is lauched when input type="text" is clicked. How can I force to launch the keyboard in javascript or using phonegap plugin?

Answer

Daniel Kurka picture Daniel Kurka · Oct 29, 2011

you can't. the mobile browser don`t show the keyboard if you focus an input element. The user has to tap the input element.