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

Input unfocus in ng-repeat #1842

Closed
Closed

Description

@ajeliuc

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

Activity

  1. dcu commented on Jan 19, 2013

    @dcu

    I am having the same issue

  2. ajeliuc commented on Jan 20, 2013

    @ajeliuc
    Author

    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... (((

  3. petebacondarwin commented on Jan 20, 2013

    @petebacondarwin
    Contributor

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

  4. ajeliuc commented on Jan 20, 2013

    @ajeliuc
    Author
  5. ajeliuc commented on Jan 21, 2013

    @ajeliuc
    Author

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

  6. petebacondarwin commented on Jan 21, 2013

    @petebacondarwin
    Contributor

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

  7. ajeliuc commented on Jan 21, 2013

    @ajeliuc
    Author

    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 )

  8. adonespitogo commented on Feb 20, 2015

    @adonespitogo

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

  9. petebacondarwin commented on Feb 24, 2015

    @petebacondarwin
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions