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

Scrollable listener triggers change detection #6713

Closed
tuanl opened this issue Aug 30, 2017 · 4 comments
Closed

Scrollable listener triggers change detection #6713

tuanl opened this issue Aug 30, 2017 · 4 comments
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Comments

@tuanl
Copy link

tuanl commented Aug 30, 2017

Scrollable's listener triggers change detection even though the listener is registered within runOutsideAngular. Adding NgZone.assertNotInAngularZone() within the callback throws an error.

https://github.com/angular/material2/blob/0f6a2ecb3de533ec76ed1d0ea4ce9d574cfbc66a/src/cdk/scrolling/scrollable.ts#L35

@jelbourn jelbourn added the P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful label Aug 30, 2017
@crisbeto
Copy link
Member

@tuanl I couldn't reproduce it by adding a couple of console.log(NgZone.isInAngularZone()); before the listener is added as well as in the callback. Do you have a more concrete example and can you share what version of Angular and Zone.js you're running?

@mhevery
Copy link
Contributor

mhevery commented Sep 1, 2017

This is related to: angular/angular#18753

@crisbeto
Copy link
Member

Closing since the related core issue is fixed.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

No branches or pull requests

4 participants