I have an app built using Ionic & Angular. I want to autofocus the input in modal and show keyboard. The following code works fine except that the placeholder disappears when input has focus. The placeholder needs to stay until user types the text.
<input type="search" placeholder="Type your text..." ng-model="searchTerm" ng-focus="showKeyboard()">
$ionicModal.fromTemplateUrl('search-modal.html', {
scope: $scope,
animation: 'fade-in',
duration: 15000,
focusFirstInput: true
})
$scope.showKeyboard = function(){
cordova.plugins.Keyboard.show();
};
Thanks in advance