Add timeout for changing active status in focus #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem if the focus was called during a change detection, that may be an angular bug related to hostbinding, but this fixes the issue
Also update some of the packages and scripts to be able to run them
If you're in the middle of a change detection and you focus, there is an expressionChangedAfterCheck exception. I think this might be related to a possible bug in angular around HostBinding expressions, but I couldn't quite figure out. I know that the HostBinding call was being made over and over on/off/on/off, seemingly part of every change detection, but I could figure out whether that was expected or not. At any rate, I encountered this when opening an ng-bootstrap modal in the onUserchange event and the two setTimeouts fixed that problem. I attempted to use change detection to fix the issue, but as I mentioned, the hostBindings were being changed all the time, so that failed to fix the issue.