Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$rootScope:inprog] $digest already in progress in blur function #6

Open
ocombe opened this issue Jun 18, 2014 · 0 comments
Open

[$rootScope:inprog] $digest already in progress in blur function #6

ocombe opened this issue Jun 18, 2014 · 0 comments

Comments

@ocombe
Copy link

ocombe commented Jun 18, 2014

In the demo when I focus the first input and type "a", the list appears, in use my keyboard keys (not the mouse) to select the first result, and press "enter".
It throws an error "[$rootScope:inprog] $digest already in progress" here:

element.bind("blur", function(event) {
   if (scope.listItems.length) {
        event.preventDefault();
        scope.$apply(function() {
            scope.close();
        })
    }
});

It works fine with the mouse click, the error just happens when you use the keyboard arrows to select the result because the key events wrap everything is scope.$apply as well.

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

No branches or pull requests

1 participant