Open steveszc opened 4 years ago
Maybe related: https://github.com/html-next/ember-raf-scheduler/issues/5
I spent some time debugging this with some teammates. We were able to identify the root cause of this issue, which is a faulty piece of conditional logic inside the scroll handler util. https://github.com/html-next/vertical-collection/blob/master/addon/-private/data-view/utils/scroll-handler.js#L53
When passive event listeners are supported, and two vertical-collection instances share the same container element, then the first vc instance adds a passive event listener, but the second vc instance starts polling for the event.
We only want to add the event listener once and want to avoid polling altogether when passive event listeners are supported.
Starting the polling pushed an extra job into the ember-raf-scheduler which was never removed. This caused ember-raf-scheduler's testWaiter to hang indefinitely.
I'll plan to submit a PR with the fix and a test in the next week or two.
Hello! Are there any plans to fix this issue? We are running into this as well! Thank you @steveszc for figuring out the root cause.
Minimal reproduction repo: https://github.com/steveszc/vertical-collection-shared-container-reproduction
When a route template contains two vertical-collections that share a common containerSelector (ex a scrollable
body
) a test that visits that route will timeout on theawait visit()
. The vertical-collections work as expected when using the app, however.