In a web-page I've got a search field. I've added a "clear" button so that users can clear the search field and start again. As a convenience, I focus the search field's text box and the cursor does appear in the box. However the soft keyboard does not seem to show up on android devices that use the default browser. In iOS and Opera Mobile it works as I'd expect.
Is there an additional method I can call that will cause the keyboard to show on Android's browser so the user can start typing right away?
function clear_search() {
if($('#searchinput').val()) {
$('#searchinput').val('');
}
$('#searchinput').focus();
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…