You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
I have a simple <input> inside a <div ng-repeat...">
As soon as I type a character the <input> focus is lost. To continue typing I first have to click inside the input area for each character I want to enter.
The essence of the ng-repeat code that shows the problem is:
<div ng-repeat="item in items">
<input ng-model="items[$index]">
</div>
However, an <input> inside the ng-repeat scope but which does not directly reference the ng-repeat array, works fine - I can enter data all day long. For example:
<div ng-repeat="item in items">
<input ng-model="george">
</div>
Note: the problem is clearly related to the the ng-model referring directly to the $index-th element in the items array. My guess is that a $watch on the collection is triggered and that causes the loss of focus.