This has been asked many many times, but no solution is working for me. I want to open a modal with a text box that gets the focus and opens the keyboard in ios. Here’s my code:
HTML:
<label id="MessageInput" class="item item-input">
<textarea id="MessageInput" placeholder="What do you want to say?" focusMe> </textarea>
</label>
JS (controller):
$timeout(function() {
//set the focus so keyboard opens
//for android
if(window.cordova) cordova.plugins.Keyboard.show();
//for ios
document.getElementById('MessageInput').focus();
},700);
config.xml
<preference name="KeyboardDisplayRequiresUserAction" value="false"/>
Shouldn’t this open the keyboard? For ios (simulator and also hardware) the textinput does not take the focus, and thus the keyboard does not open.