angular-google-places-autocomplete
angular-google-places-autocomplete copied to clipboard
$scope.apply error when backspacing chosen place
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
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!
following #47 I fixed this by modifying in line 192 "$scope.$apply(..." with $timeout. This worked for me..
Turned it into a pull request: https://github.com/kuhnza/angular-google-places-autocomplete/pull/75
I got the same problem........replace $apply with $timeout also works for me