Skip to content

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

Open
@ocombe

Description

@ocombe

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.

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