@bhanu7755 wrote:
Hello everyone,
I'm trying to set focus to first field in form when user clicks option from side menu. But, it is not working when I clicked item from side menu and it is working only when i'm clicking icon from dashboard page.
Here is the code I'm using
Home
<ion-item nav-clear class="item-icon-right" ng-click="vm.toggleGroup('counting')"
ng-class="{active: vm.isGroupShown('counting')}">
Counting
<ion-item nav-clear menu-close class="item-accordion"
ng-show="vm.isGroupShown('counting')" ui-sref="side-menu.scan">
Test1
<ion-item nav-clear menu-close class="item-accordion"
ng-show="vm.isGroupShown('counting')" ui-sref="side-menu.stocktake">
Test 2
When I clicked test 1 form displays but focus was not set. Below is the code I'm using to set focus.
$timeout(function () {
document.getElementById('txtsearch').select();
}, 0);
Posts: 1
Participants: 1