Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

removeChipAndFocusInput Error #2544

Closed
sysupbda opened this issue Apr 24, 2015 · 2 comments
Closed

removeChipAndFocusInput Error #2544

sysupbda opened this issue Apr 24, 2015 · 2 comments
Assignees
Milestone

Comments

@sysupbda
Copy link

When removing a chip with the default md-chip-remove, you get a $apply already in progress error from the MdChipsCtrl.onFocus call. Here is the error track.

Error: [$rootScope:inprog] $apply already in progress
http://errors.angularjs.org/1.3.15/$rootScope/inprog?p0=%24apply
at REGEX_STRING_REGEXP (http://localhost:9000/bower_components/angular/angular.js:63:12)
at beginPhase (http://localhost:9000/bower_components/angular/angular.js:14831:15)
at Scope.$get.Scope.$apply (http://localhost:9000/bower_components/angular/angular.js:14575:11)
at MdChipsCtrl. (http://localhost:9000/bower_components/angular-material/angular-material.js:12269:48)
at HTMLInputElement.jQuery.event.dispatch (http://localhost:9000/bower_components/jquery/dist/jquery.js:4430:9)
at HTMLInputElement.jQuery.event.add.elemData.handle (http://localhost:9000/bower_components/jquery/dist/jquery.js:4116:28)
at MdChipsCtrl.onFocus (http://localhost:9000/bower_components/angular-material/angular-material.js:12236:20)
at MdChipsCtrl.removeChipAndFocusInput (http://localhost:9000/bower_components/angular-material/angular-material.js:12170:10)
at $parseFunctionCall (http://localhost:9000/bower_components/angular/angular.js:12415:18)
at ngEventDirectives.(anonymous function).compile.element.on.callback (http://localhost:9000/bower_components/angular/angular.js:21577:17)(anonymous function) @ angular.js:11666$get @ angular.js:8607$get.Scope.$apply @ angular.js:14578(anonymous function) @ angular-material.js:12269jQuery.event.dispatch @ jquery.js:4430jQuery.event.add.elemData.handle @ jquery.js:4116MdChipsCtrl.onFocus @ angular-material.js:12236MdChipsCtrl.removeChipAndFocusInput @ angular-material.js:12170$parseFunctionCall @ angular.js:12415ngEventDirectives.(anonymous function).compile.element.on.callback @ angular.js:21577$get.Scope.$eval @ angular.js:14477$get.Scope.$apply @ angular.js:14576(anonymous function) @ angular.js:21582jQuery.event.dispatch @ jquery.js:4430jQuery.event.add.elemData.handle @ jquery.js:4116

I created an example to illustrate this. Just click on the removal x on the chip Blue and you will raise the Error mentioned above.
https://gist.github.com/anonymous/dedb59710f4d173d8109

@sysupbda
Copy link
Author

I should mention this is a new problem with 0.9 RC2 and did not happen in RC1

@ThomasBurleson
Copy link
Contributor

To be fixed with Pull Request #2591

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

No branches or pull requests

3 participants