in my form I have some input which is my custom directive and some text field. Additionally I have buttons: first one is for "Add new input to form" which binds to function `$scope.AddNewItem()` in my controller, second one is for "Remove input from form" which binded to function `$scope.RemoveItem(index_of_item)`. Problem occurs when I type in my text field and press enter - input value is deleted because `$scope.RemoveItem(index_of_item)` is called itself. I'm sure I'm not call it because even Call Stack doesn't show the place where I could do it. 
Does anybody has the same problem?

```
<div class="form-group " ng-repeat="(i, user) in users">
    <div class="col-sm-5" style="padding-right: 0px; margin-top: 0px">
        <div typeahead ng-model="users[i]"> </div>
    </div>
    <div class="col-sm-2 ng-scope" style="padding-left: 5px; margin-top: 0px">
        <button ng-click="removeUserInput(i)" class="btn pull-right m-t-n-xs remove-input">
            <i>
                    <span class="glyphicon glyphicon-minus" style="color: white;"></span>
                </i>
        </button>
        <button ng-click="addUserInput()" class="btn pull-right m-t-n-xs add-input">
            <i>
                    <span class="glyphicon glyphicon-plus" style="color: white;"></span>
                </i>
        </button>
    </div>
</div>

```

And my controller code: 

```
   $scope.addUserInput = function () {
        $scope.users.push({});
    };

    $scope.removeUserInput = function (index) {
        if ($scope.users.length > 1) {
            $scope.users.splice(index, 1);
        }
        else if ($scope.users.length == 1) {
            $scope.users[0] = {};
        }
    };                                  

```