You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2025. It is now read-only.
Load a page with a firebase-query in a background tab
Switch to the tab
Notice the query's data is empty
Why?
If you load this in an unfocused (background) tab in your browser, the query will be setup correctly and the data will be populated as expected (child_added events are fired).
If you then focus the tab in your browser, the first requested animation frame is processed, so Polymer calls any attached handlers. This triggers __queryChanged which will set the data to [].
The problem here seems to be that, because we already got the initial child_added events, they will not fire again and we will keep our empty array.
Not sure how we should deal with this, being more careful around the attached event somehow.
Expected behaviour
child_added events fire
data is populated
tab is focused
data remains populated
Actual behaviour
child_added events fire
data is populated
tab is focused
data is set to []
child_added events don't fire again, data remains []