Having some issues in Android using the ion-autocomplete plugin and Ionic view
https://github.com/guylabs/ion-autocomplete
Basically in android I click on my input and the keyboard bar appears but when I click on an autocomplete item the keyboard does not hide itself it just stays even if I switch views there after.
My input field
<ion-view class="home-search">
<ion-content class="has-header has-tabs" padding="false">
<form ng-submit="vm.searchQuery() && searchForm.$valid" name="searchForm" novalidate>
<div class="list list-inset search-box">
<label class="item item-input item-input-wrapper">
<input type="text" placeholder="Enter Address" readonly="readonly" ng-model="vm.search.query" autocomplete="off" spellcheck="false" ion-autocomplete class="ion-autocomplete" max-selected-items="1" items-method="vm.callbackMethod(query,isInitializing)" items-method-value-key="options" item-value-key="id" item-view-value-key="displayName" items-clicked-method="vm.clickedMethod(callback)" cancel-button-clicked-method="vm.cancelButtonClickedMethod(callback)" items-removed-method="vm.removedMethod(callback)" external-model="vm.search.items">
<button class="button button-small button-positive" ng-disabled="loading" type="submit">
<i class="icon ion-search placeholder-icon"></i>
</button>
</label>
</div>
</form>
and the onclick event (note I even tried forcing the close event)
vm.clickedMethod = function (callback) {
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.close();
}
$ionicLoading.show({
template: 'Searching...'
});
searchApi.followNextUrl(callback.item.links,"next").then(function(data){
$ionicLoading.hide();
searchApi.getNextSearchView(data);
});
};
Any idea why keyboard is not closing, or how I could fix this ?