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

Bug: VirtualScroll escapes NgZone #10832

Closed
ihadeed opened this issue Mar 18, 2017 · 6 comments
Closed

Bug: VirtualScroll escapes NgZone #10832

ihadeed opened this issue Mar 18, 2017 · 6 comments

Comments

@ihadeed
Copy link
Contributor

ihadeed commented Mar 18, 2017

Ionic version: 2.x

I'm submitting a ... bug report

Current behavior:
Opening a page from VirtualScroll causes the child page to escape NgZone.

Steps to reproduce:

  • Create a method that pushes a new page, e.g.:
openPage(page) {
  this.navCtrl.push(page);
}
  • Call that method from a virtualScroll item

See plunker example here: http://plnkr.co/edit/upZqGYgmYjf0LIJbTeQY?p=preview

@ihadeed ihadeed changed the title VirtualScroll escapes NgZone Bug: VirtualScroll escapes NgZone Mar 18, 2017
@frederikschubert
Copy link

Duplicate of #10451

@manucorporat
Copy link
Contributor

can you provide an example that shows something not actually working because of this?

@frederikschubert
Copy link

The change detection does not work as expected for components that are created outside the angular zone. Events and changes of properties that are decorated with @Input() do not trigger a change detection cycle anymore. This breaks components that rely on the standard change detection behavior.

@ihadeed
Copy link
Contributor Author

ihadeed commented Mar 19, 2017

@manucorporat

The example shows that if you display a child page by clicking on a virtual scroll item, it will not be in Angular zone. Which means that change detection will not function at all.

I haven't looked at the source code of Virtual Scroll, but I'm guessing there's a piece of code there that's causing the click event handler to be invoked outside of Angular zone.

@brandyscarney
Copy link
Member

I'm going to close this as a duplicate of #10451 but please feel free to continue the discussion here. Thanks!

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 3, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants