# $ionicModal focusFirstInput not working on ios devices

**URL:** <https://forum.ionicframework.com/t/ionicmodal-focusfirstinput-not-working-on-ios-devices/10017>\
**Category:** ionic-v1\
**Created:** [September 22, 2014, 2:07pm UTC](https://forum.ionicframework.com/t/ionicmodal-focusfirstinput-not-working-on-ios-devices/10017 "2014-09-22T14:07:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MeghaY](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MeghaY](https://forum.ionicframework.com/u/MeghaY)\
**Post date:** [September 22, 2014, 2:07pm UTC](https://forum.ionicframework.com/t/ionicmodal-focusfirstinput-not-working-on-ios-devices/10017/1 "2014-09-22T14:07:42Z")

</div>

I am using angularjs and ionic framework for html5 mobile app. The scenario is when user clicks the search box on main page. A modal should load up autofocusing the searchbox input field and cancel button inline. Also when the searchbox in Modal autofocuses on input field, it should also open up the ios keyboard. Right now what is happening is when I click on searchbox on main page, it opens up the modal with search header and cancel button and also autofocuses on search input [field.It](http://field.It) is working fine on desktop view. But the autofocus feature is not working properly on ios devices and also the keyboard doesn’t pop-up when modal loads up.

Acc. to ionic docs [http://ionicframework.com/docs/api/controller/ionicModal/](http://ionicframework.com/docs/api/controller/ionicModal/) I am using

```
focusFirstInput: true 

```

for autofocus to work.

Here is the plunker [sample] ([http://plnkr.co/edit/YAPzL9b2V3jBcH9ebF0b](http://plnkr.co/edit/YAPzL9b2V3jBcH9ebF0b)) that I created which works fine on desktop but not on iphone 4 and 5.

Please, Let me know how can I make this work on iOS and android devices.

---

<div class="post-metadata">

**Author:** ![MeghaY](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MeghaY](https://forum.ionicframework.com/u/MeghaY)\
**Post date:** [October 1, 2014, 1:17pm UTC](https://forum.ionicframework.com/t/ionicmodal-focusfirstinput-not-working-on-ios-devices/10017/2 "2014-10-01T13:17:31Z")

</div>

Still waiting for someone to respond to this issue…any ideas how to make it work?

---

<div class="post-metadata">

**Author:** ![iwantwin](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@iwantwin](https://forum.ionicframework.com/u/iwantwin)\
**Post date:** [October 1, 2014, 1:26pm UTC](https://forum.ionicframework.com/t/ionicmodal-focusfirstinput-not-working-on-ios-devices/10017/3 "2014-10-01T13:26:19Z")

</div>

I have no ideas about it… But it seems to me it’s the same as [this issue](https://github.com/driftyco/ionic/issues/1112)

---

<div class="post-metadata">

**Author:** ![MeghaY](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MeghaY](https://forum.ionicframework.com/u/MeghaY)\
**Post date:** [October 1, 2014, 2:05pm UTC](https://forum.ionicframework.com/t/ionicmodal-focusfirstinput-not-working-on-ios-devices/10017/4 "2014-10-01T14:05:38Z")

</div>

Yea I have seen this issue and have replied to that … don’t think it is resolved yet
