I have a field that has autofocus attribute

```
 <input placeholder="ID" type="text" name="searchId" autofocus
                   data-ng-model="vm.searchCriteria.searchId" data-ng-required="vm.isSearchIdRequired"
                   data-ng-minlength="1" data-sr-maxlength="{{vm.searchIdMaxLength}}" data-sr-numberonly
                   data-ng-class="{'input-error': vm.isSearchIdValid}"
                   data-ng-change="vm.onSearchIdChange()">

```

and I have a clear button that resets the form to initial state via reset function on the controller

```
function reset() {
            $scope.searchForm.$setPristine();
            $scope.vm.reset();
        }

```

Everything works fine, except the form is not focusing back to the searchId field. What is the proper way to handle this? Do I need to write a directive and use it instead of autofocus?