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

Cleanup is overzealous #36

Open
jskeate opened this issue Jan 23, 2015 · 4 comments
Open

Cleanup is overzealous #36

jskeate opened this issue Jan 23, 2015 · 4 comments

Comments

@jskeate
Copy link

jskeate commented Jan 23, 2015

Example -- two cloaked collections in one page. For this example they both render the same list, which is just [0-199]

The issue occurs if you open them both, then close one. Seems like this kills the scroll event listener for all cloaked collections.

Also odd: on the initial toggle, it doesn't render to fill the viewport. For me it gets to 27, then stops. Also the second list never renders 199, and 198 is dodgy too.

@runspired
Copy link

I can fix this on the es6 branch, thanks for the detailed report!

I bumped into this last week where multiple instances (not even on the same route) would cause this to happen.

@runspired
Copy link

Just pinging to let you know I'm starting work on this today after making any necessary HTMLBars changes

@runspired
Copy link

@jskeate This is now fixed on the es6-flattened branch.

@eviltrout I appended the cloaked-collection view's element ID to the listener ID to avoid removing the listener for other instances during teardown. In my case, I use liquid-fire for animated transitions, which means the old view doesn't get torn down before the new view get's inserted, leading to instances on separate routes also colliding with each other.

@eviltrout
Copy link
Owner

@runspired sounds good. Once I started on the HTMLBars branch of Discourse I will be looking at this more closely. Until then thanks for your work!

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

No branches or pull requests

3 participants