-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Expression has changed after it was checked. #1159
Comments
I hope that this might be helpful/relevant. However, on both Chrome (55.0.2883.87) and Edge, I can not reproduce either error. |
@Phmager what shell I do to see the error in your plunker? I can't trigger the mentioned error by typing to the input box, switching tabs etc. Could you please provide exact steps to reproduce? As @alex321 mentioned it might be linked to a browser version (I'm using Chrome 55.0.2883.95) so if you can still reproduce it please add info about your environment. |
Currently at home I cannot reproduce it in the initial plunker (Chrome 55.0.2883.87). Here is the correct plunker: Steps to reproduce:
|
@Phmager thnx for getting back with a new plunker / more info. Unfortunately I still can't reproduce the problem on my end with the updated instructions on latest Chrome... Maybe it is one of the extensions that is causing problems? Could you try in the incognito window? I don't have Edge handy so can't confirm this one one... |
@pkozlowski-opensource I was able to replicate the error message. |
@pkozlowski-opensource @Phmager I can reproduce it now. I really doubt that this has anything to do with ng-bootstrap. In my opinion, this is a problem with angular and it would be good to update the Issue you have raised on their board with the new plunker. |
I am seeing the same error with NgbAccordion after I upgraded from alpha-14 to alpha-18. I downgraded one version at a time back to alpha-14 and saw it in each version until I got back to alpha-14. On my page I have a button inside an NgbAccordion. Clicking the button should open an NgbModal but due to the error above, for every version of ng-bootstrap after alpha-14 it breaks. I will try to reproduce in a plunker. |
I was having trouble recreating my issue in a plunker so I am trying to debug it in my app. It's going slow but the bug has something to do with the focus not being updated properly on the |
I debugged a similar issue and traced it to the following: Within a |
Getting the same error -
So it's definitely has something to do with the focus. What have worked for me:What I did is to invoke Hope it helps in some way |
I upgraded to the latest version of ng-bootstrap along with some other package updates and this problem has gone away for me. I am currently on Angular 2.4.0, ng-bootstrap 1.0.0-alpha.21, bootstrap 4.0.0-alpha.6, rxjs 5.1.0, zone.js 0.7.6, @angular/cli 1.0.0-rc.2, and typescript ~2.0.0. |
Hi there! I was just investigating this issue and I must say that I'm utterly confused right now :-) My confusion steams from the following:
At this point I don't feel like I've got the exact scenario that causes error(s) (probably there are several issues being discussed here...) with the latest version. Without a small reproduce scenario it is hard to debug and fix things... @shairez I think I see how your particular scenario could cause problems but having a plunker would help here as I could be sure :-) |
@pkozlowski-opensource |
https://plnkr.co/edit/nZxvGbNpRo6wZkoD1Qkd?p=preview So, when creating the Plunker, I identified a few more nuances to recreate my scenario: it seems to be a combination of NgbAccordion, a It should also be noted to anyone else stumbling upon this error, that it is a by-product of Angular's added development mode checking and won't occur when @pkozlowski-opensource Thanks for looking into this one - I hope the plunker helps! |
Thnx for the plunker @L1NT - I understand now what is going on! It basically boils down to having a binding that changes based on element's focus - modal gets focused when opened hence the error. The good news is that accordion doesn't really need focus-based inputs - we should be able to remove this portion of the code and remove the root cause of the problem. I know how to fix it and I will do so as soon as the dust settles around Angular 4.0 support. Once again, thnx for the plunker. |
Is there a workaround at the moment for preventing this error? |
I go this working by having these lines in my code : // This is used to push change detection for ng2 ngAfterViewChecked() { |
`aria-selected` is true when panel is open fix ng-bootstrap#1159
Hi, i have the same issue on my project when i want to open a modal automatically, i have this error. So i put a timeout but i am not sure it the best solution. |
Tuve el mismo problema al ejecutar (keypress)=metodo($event) y se intentaba abrir un modal me salia el error en consola // lo solucione con : |
Bug description:
When using async angular 2 validators in combination with the tab control it throws:
"Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'."
In the plunker I could only reproduce the problem referencing the same formControl. In the real application I don't do this and also have that problem.
Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/qXwfi24qGKm1S1W3CWg3?p=preview
Version of Angular, ng-bootstrap, and Bootstrap:
See plunker.
The text was updated successfully, but these errors were encountered: