# On submit keyboard reappears always

**URL:** <https://forum.ionicframework.com/t/on-submit-keyboard-reappears-always/22247>\
**Category:** ionic-v1\
**Created:** [May 3, 2015, 2:49pm UTC](https://forum.ionicframework.com/t/on-submit-keyboard-reappears-always/22247 "2015-05-03T14:49:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivek\_nk](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@vivek\_nk](https://forum.ionicframework.com/u/vivek_nk)\
**Post date:** [May 3, 2015, 2:49pm UTC](https://forum.ionicframework.com/t/on-submit-keyboard-reappears-always/22247/1 "2015-05-03T14:49:15Z")

</div>

I have an input and a button of type “submit”  
On click of submit, i make a REST call to show the result.

The frustrating part is that the input field always gets auto focused even after the submit button is clicked. I even tried calling

> cordova.plugins.Keyboard.close();  
> angular.element(document.querySelector(‘input’)).blur();

but in vain. Keyword does not go off. Because that input is getting the focus again!!  
My html code is

```
<div class="item item-input">
  <input placeholder="search for" type="text" ng-model="mydata.searchquery">
  <button type="submit" id="go" value="go" class="button button-calm" ng-click="findAll()">Find</button>
</div>

```

---

<div class="post-metadata">

**Author:** ![vivek\_nk](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@vivek\_nk](https://forum.ionicframework.com/u/vivek_nk)\
**Post date:** [May 3, 2015, 8:08pm UTC](https://forum.ionicframework.com/t/on-submit-keyboard-reappears-always/22247/2 "2015-05-03T20:08:23Z")

</div>

> ionic.DomUtil.blurAll();

Calling this in the controller works!! The focus is removed from any of the elements in the UI.
