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

$scope.apply error when backspacing chosen place #20

Open
ghoward500 opened this issue Apr 4, 2015 · 3 comments
Open

$scope.apply error when backspacing chosen place #20

ghoward500 opened this issue Apr 4, 2015 · 3 comments

Comments

@ghoward500
Copy link

After I choose a prediction from the list, if I go to the end of the text in the input and hold down backspace to erase the text in the input field there is an error thrown for $scope.apply as it is removing text:

Error: [$rootScope:inprog] $apply already in progress
http://errors.angularjs.org/1.3.5/$rootScope/inprog?p0=%24apply
at REGEX_STRING_REGEXP (.../js/angular.js:63:12)
at beginPhase (.../js/angular.js:14644:15)
at Scope.$get.Scope.$apply (.../js/angular.js:14388:11)
at .../js/autocomplete.js:190:36
at C8 (eval at (eval at (eval at (eval at (https://maps.gstatic.com/maps-api-v3/api/js/20/6/main.js:60:931)))), :17:495)
at B8.(anonymous function).getPlacePredictions (eval at (eval at (eval at (eval at (https://maps.gstatic.com/maps-api-v3/api/js/20/6/main.js:60:931)))), :18:45)
at Ll.eval (eval at (https://maps.gstatic.com/maps-api-v3/api/js/20/6/main.js:60:931), :1:388)
at https://maps.gstatic.com/maps-api-v3/api/js/20/6/main.js:15:265
at ag (https://maps.gstatic.com/maps-api-v3/api/js/20/6/main.js:27:432)
at Ll.(anonymous function).getPlacePredictions (eval at (https://maps.gstatic.com/maps-api-v3/api/js/20/6/main.js:60:931), :1:345)

It happens every time I test it and does not seem random.

Let me know if you need additional information. Thanks for the module, it has been working great other than this slight issue!

@evba1
Copy link

evba1 commented Dec 8, 2015

following #47 I fixed this by modifying in line 192 "$scope.$apply(..." with $timeout. This worked for me..

@cmkramer
Copy link

Turned it into a pull request: #75

@ericklombardo
Copy link

I got the same problem........replace $apply with $timeout also works for me

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

4 participants