I'm making a chat application for android with phonegap but i'm facing a problem.
I have a text area field (where the users can write their messages) and a button to send the messages.
When the user clicks on the text area, the keyboard comes up. However, when the user clicks the button to send the message, the text area field loses the focus and the keyboard disappears. I'd like to keep to keyboard displayed and give back the focus to the text area.
I've tried to select the keyboard with
$('#text-area).focus()
But it didn't work out.
I have also added this line to my config.xml.
<preference name="KeyboardDisplayRequiresUserAction" value="false"/>
I've tried to use the plugin https://github.com/driftyco/ionic-plugins-keyboard. When the keyboard is going to hide, it fires an event but the only thing I can do is to open it again with
cordova.plugins.Keyboard.show();
The problem is that the keyboard hide/show and the animation is still triggered.
Any advices ?