Keyboard comes up and go down immediately

This is my controller’s function to give focus to a specific input to have the keyboard come up and write on it.

$scope.focusToKeyboard = function(){
	jQuery('.map-post-box').focus();
	//jQuery('#map-post-input').trigger("focus");
	
	console.log("keyboard up!!");
};

as well as element below,

<!-- Posting ng-disabled='!isCanPost'-->
    <form ng-controller='PostsCtrl' name='postForm' ng-submit='addPost()' novalidate>
      <input type='text'  
          ng-model='content'
          ng-focus='moveToPostLocation()' 
          maxlength='38' 
          class='map-post-box'
          id='map-post-input'
          placeholder='what will happen today?' autocorrect="off" required>
          
      <!--
      <button ng-disabled='postForm.$invalid'
          ng-click='addPost()' 
          class="map-post-box button button-small button-assertive" 
          id='map-btn-submit'> 
          {{ isInstant(timevalue) && 'Instant' || (timevalue | date:"mm : ss") }} 
      </button>
      -->
    </form>

somehow the keyboard comes up and go down immediately…

Use this directive: Auto-focus Textbox while template loads

I guess it won’t work for iOS?

Showing keyboard not supported in iOS due to platform limitations.

Unfortunately, I don’t know; I’m too lazy to try it on my Mac. It sits closed in my wardrobe. I know that you can’t use Ionic keyboard plugin to programmatically open a keyboard in iOS environment but focus alone should do it.

Though I can tell you it works on Android devices, I tried that successfully.