Hello,
I am trying to implement a search box with the following:
-
an inset search icon followed by a input, followed by a clear button (x). The clear button should only clear the search content but not bring the soft keyboard down or animate the search bar out.
-
A cancel button which will also clear the content, bring the soft keyboard down, and animate the search bar out
-
If I wrap the inset items in a label as seen in the docs, the ng-click on the clear button wont work because of how ionic treats labels.
-
If I wrap the inset items in a div, then clicking the clear button will blur the input (before ng-click is fired) which then will cause the keyboard to go down.
Does anyone know of a possible solution that will work on ios/Android/
Of course I can focus again when the clear button is clicked but the keyboard will go down first then come back up which looks funny.
I am currently looking for a solution for ios/Android/Windows phone. When in a div, I can make a call to input.focus() in my clear() function, however since the ng-click is fired AFTER the blur on input, the keyboard will hide and then show again which looks a little quirky…
Any ideas? , Thanks alot in advance.