blurActive() does not allow to clear search field without losing focus

400 msec timeout (ionic.js@2521) without ability to cancel it, makes it impossible to click on X icon (I mean a standard search bar) with clearing search field and setting focus back on an input field.
As a fact, the input obtains a focus, and then blurActive() releases it.

In my code I create a 500 msec timeout which sets focus back, but a virtual keyboard uses a 100 msec gap to start hiding. I’d like to avoid this.

Has anyone successfully solved this issue?

I entered a bug about it.

For now I have commented out blurActive() in handleFocus().

1 Like

FYI : Issue # 1108 :

Please post your issue number next time so everyone can see the status if they come across this in the future.


I’m having the same problem in Ionic, v1.0.0-rc.1. On iOS when the focus is in the input field the soft keyboard is displayed. When I click the clear button, the soft keyboard is dismissed, the input is cleared and the input has lost focus. Is there way to keep the focus on the input when the clear button is clicked to prevent the soft keyboard from being incorrectly dismissed.

My code looks like this:

<div class="item item-input">
   <input type="text" required name="username" ng-model="formData.username"
      placeholder="User Name">
    <i  class="icon ion-close" ng-model="formData.username"
      ng-click="formData.username = ''"></i>

Did you solve this issue. I posted a reply to the moderator below.