Datepicker and ngAnimate (Angular 1.3.X)
This bug is present with angular version 1.3.X and ui-bootstrap 0.13.1.
Some log are thrown : "TypeError: Cannot read property 'parentNode' of undefined at angular-animate.js:1203 at angular-animate.js:539 at Scope.$get.Scope.$digest (angular.js:14293) at Scope.$get.Scope.$apply (angular.js:14506) at bootstrapApply (angular.js:1448) at Object.invoke (angular.js:4185) at doBootstrap (angular.js:1446) at bootstrap (angular.js:1466) at angularInit (angular.js:1360) at angular.js:26125"
I made a plunker to reproduce (check logs in console). http://plnkr.co/edit/JmRcZgCDyy2tXD7qFW1g?p=preview
I have no time to investigate right now but it can be caused by the recent refactoring of the datepicker (in order to remove some watchers, https://github.com/angular-ui/bootstrap/pull/3770)
This bug is not present with angular 1.4.X
Thank you for isolating this - I will look into this early next week and hope to have a fix released in the next two weeks.
This error appears to disappear in Angular 1.4 as shown here.
A fix for 1.3 is ideal here, although it does not seem to break functionality. This appears to be a bug in Angular itself, but it should be noted that the Angular team has moved on to mainly focus support on 1.4 as the stable release and 1.2 for IE8 support. The bug seems to be related to ngAnimate and the directive replace option, as the error can be observed to be removed if replace: true is removed from datepickerPopupWrap.
It should be noted that we have moved to testing in 1.4 off of master now.
I am not sure whether it is worth patching this, although I do welcome any PRs.
Ok thanks for your investigation. Which release should fully support angular 1.4? Le 29 juil. 2015 7:52 AM, "Wesley Cho" [email protected] a écrit :
This error appears to disappear in Angular 1.4 as shown here http://plnkr.co/edit/m4AsVj4KXjmiSFEoHK3f?p=preview.
A fix for 1.3 is ideal here, although it does not seem to break functionality. This appears to be a bug in Angular itself, but it should be noted that the Angular team has moved on to mainly focus support on 1.4 as the stable release and 1.2 for IE8 support. The bug seems to be related to ngAnimate and the directive replace option, as the error can be observed to be removed if replace: true is removed from datepickerPopupWrap.
It should be noted that we have moved to testing in 1.4 off of master now.
I am not sure whether it is worth patching this, although I do welcome any PRs.
— Reply to this email directly or view it on GitHub https://github.com/angular-ui/bootstrap/issues/4012#issuecomment-125850457 .
I am not able to choose date again when choosed once in the datepicker of ui bootstrap. How to get rid of this problem pls help me.
@lgaudez 1.4 will be fully supported by 0.13.2, which is likely to come out this weekend.
Ok perfect, i'll wait for 0.13.2. You can close this issue. Thanks Le 30 juil. 2015 6:55 AM, "Wesley Cho" [email protected] a écrit :
@lgaudez https://github.com/lgaudez 1.4 will be fully supported by 0.13.2, which is likely to come out this weekend.
— Reply to this email directly or view it on GitHub https://github.com/angular-ui/bootstrap/issues/4012#issuecomment-126183061 .
I am still seeing this issue in the new version
I'm still seeing the issue persist even after reinstalling whole bower packages, I'm using it with Angular 1.3.17
I've updated example provided by @lgaudez with latest script versions http://plnkr.co/edit/OYgnLKiAHa640JKq2YGV?p=preview
I hope you're not suing it, but using it :) .
I will look into this - as far as I remember, it wasn't causing any breaking functionality though.
Haha! Yes, I'me aware that it's not breaking functionality but does get in a way of consoles and does not look nice to show errors while reviewing apps with clients devs.
It's definitely fair, I shouldn't have closed the issue and scheduled this more appropriately - that was laziness on my part, and it was good that it was pointed out.
Looking into this further, I suspect this may be an issue in ngAnimate itself - I have created an issue https://github.com/angular/angular.js/issues/12503 for reference.
Thanks for the update, the issue only happens when I use datepicker but not other ui directives with ngAnimate. So somehow the combination of two are causing the issue.
I also see this issue only with datepicker.
Ya it is something directly related to ui.bootstrap @wesleycho and not angular.
Please look at: http://plnkr.co/edit/MnBZ2rJfz7uw0u6bVbLo?p=preview
In the above link ui.bootstrap does not have this issue for version 0.13.0. This issue is only present in 0.13.1 and 0.13.2 of ui.bootstrap.
Having same issue. My temporary fix is to wrap my overridden template template/datepicker/popup.html with additional <div>...</div>
@codeorganic the datepicker does not use ngAnimate for anything - the stack trace of the errors are also sole with ngAnimate. That explanation is not the proper way to evaluate where the bug lies.
@wesleycho okay sounds good
@moonboyio Do you have a working plnkr.co with your fix?
@wesleycho
This is a simple example: http://plnkr.co/edit/iaZGS6mYvMiJY5pu19Ig?p=preview See additional div wrapper in a template.