Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Input unfocus in ng-repeat #1842

Closed
ajeliuc opened this issue Jan 19, 2013 · 9 comments
Closed

Input unfocus in ng-repeat #1842

ajeliuc opened this issue Jan 19, 2013 · 9 comments

Comments

@ajeliuc
Copy link

ajeliuc commented Jan 19, 2013

I'm creating the form for objects items. One of the item is array of items. So i use ng-repeat to iterate over it. Each of them is input text field. So I got the like:

<div class="control-group" ng-repeat="(key, item) in object.items">
<div class="controls>
<input type="text" ng-model="object.items[key]"/>
</div>
</div>

When I'm trying to enter some code after each entered word my input gets unfocused and to continue I need to focus on it again using cursor. If I use html ng-model="item" instead of htlm ng-model="object.items[k]" The input field bacames blocked and uneditable

Firebug doesn't show any error logs or alerts. But seems it should work in this way

@dcu
Copy link

dcu commented Jan 19, 2013

I am having the same issue

@ajeliuc
Copy link
Author

ajeliuc commented Jan 20, 2013

the funny thing is that if i use objects object instead of array it works fine. But. what for do i need to save additional keys in db if I can use simple one dimensional array... (((

@petebacondarwin
Copy link
Contributor

This is a bug in Angular. Here is a fix: #1661

@ajeliuc
Copy link
Author

ajeliuc commented Jan 20, 2013

@petebacondarwin Thx! 👍

@ajeliuc
Copy link
Author

ajeliuc commented Jan 21, 2013

@petebacondarwin I expirience problems merging your repeat branch with current master. May you help me?

@petebacondarwin
Copy link
Contributor

I have rebased and pushed the branch. It should fast forward onto master now

@ajeliuc
Copy link
Author

ajeliuc commented Jan 21, 2013

It was helpful! ) @petebacondarwin Thank you!

Although in the end of rake package I get:

build/angular.js:14086: WARNING - Suspicious code. Is there a missing '+' on the previous line?
});'use strict';
   ^
0 error(s), 1 warning(s)

generally it works perfectly fine as it should )

@adonespitogo
Copy link

Hi, since this issue has been closed as well as pull request #1661, has this issue been fixed somewhere else?

@petebacondarwin
Copy link
Contributor

This is fixed in most versions of angular. See http://plnkr.co/edit/EghJVcFd7cbEiJ0zDmhr?p=preview

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants