# Keyboard comes up and go down immediately

**URL:** <https://forum.ionicframework.com/t/keyboard-comes-up-and-go-down-immediately/31214>\
**Category:** ionic-v1\
**Created:** [August 26, 2015, 8:14am UTC](https://forum.ionicframework.com/t/keyboard-comes-up-and-go-down-immediately/31214 "2015-08-26T08:14:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkkcloud](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/fkkcloud/32/14033_2.png) [@fkkcloud](https://forum.ionicframework.com/u/fkkcloud)\
**Post date:** [August 26, 2015, 8:14am UTC](https://forum.ionicframework.com/t/keyboard-comes-up-and-go-down-immediately/31214/1 "2015-08-26T08:14:53Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Gajotres](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gajotres/32/98564_2.png) [@Gajotres](https://forum.ionicframework.com/u/Gajotres)\
**Post date:** [August 26, 2015, 7:33pm UTC](https://forum.ionicframework.com/t/keyboard-comes-up-and-go-down-immediately/31214/2 "2015-08-26T19:33:25Z")

</div>

Use this directive: [Auto-focus Textbox while template loads](http://forum.ionicframework.com/t/auto-focus-textbox-while-template-loads/6851/26?u=gajotres)

---

<div class="post-metadata">

**Author:** ![fkkcloud](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/fkkcloud/32/14033_2.png) [@fkkcloud](https://forum.ionicframework.com/u/fkkcloud)\
**Post date:** [August 27, 2015, 5:10am UTC](https://forum.ionicframework.com/t/keyboard-comes-up-and-go-down-immediately/31214/3 "2015-08-27T05:10:14Z")

</div>

I guess it won’t work for iOS?

> Showing keyboard not supported in iOS due to platform limitations.

---

<div class="post-metadata">

**Author:** ![Gajotres](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gajotres/32/98564_2.png) [@Gajotres](https://forum.ionicframework.com/u/Gajotres)\
**Post date:** [August 27, 2015, 9:49am UTC](https://forum.ionicframework.com/t/keyboard-comes-up-and-go-down-immediately/31214/4 "2015-08-27T09:49:39Z")

</div>

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.
