I'm trying to create a directive that would "control" two input boxes (there will be several of these directives on a page created with ng-repeat). The functionality that I can't find a solution for is focus.
Input boxes need to switch focus between them in each directive (ie. once I select one input box and press enter, focus needs to go to it's "sibling" input, press enter there and focus goes back to first input etc.). Focus never leaves a directive (ie. one of the two input boxes) unless I select another input in another directive.
Is there any elegant AngularJS solution for this behavior? Or, if not, is there any solution not involving jQuery?