Skip to content
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

Fixed problem with opening color picker when using ChangeDetectionStr… #22

Merged
merged 1 commit into from
Jun 7, 2017

Conversation

piotrn1
Copy link

@piotrn1 piotrn1 commented Jun 6, 2017

Fixed problem with opening color picker when using ChangeDetectionStrategy.OnPush

@wartab
Copy link

wartab commented Jun 7, 2017

Can you show what an example of a problem instance in which your fix is required? As far as I know, setTimeout is overriden by Angular to already perform a top down change detection, so it seems odd to have to explicitely ask Angular to do it before the setTimeout callback returns.

@piotrn1
Copy link
Author

piotrn1 commented Jun 7, 2017

Here is an example:
http://plnkr.co/edit/xJUD5w7cuqCSnmIA0Wn8?p=preview

@sconix
Copy link
Contributor

sconix commented Jun 7, 2017

When you are using onPush the change detection is not run on timeout so this fix is correct. I will merge this for next release. The only thing I am not sure is that is markForCheck enough or do we really need to call detectChanges.

@sconix sconix merged commit 3fc7fc9 into zefoy:master Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants