Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

fix closeQuery to only close itself #33

Merged
merged 1 commit into from
Feb 2, 2015

Conversation

jshortall
Copy link
Contributor

Issue:
If you have two webcomponents on the same page, each with a firebase-element listening to the same path, when one is removed, it will shutdown the listeners on the other.

Solution:
this.query.off(); called with no parameters closes all Firebase listeners at that location. It should instead be called with the original eventType, callback and context passed in. (https://www.firebase.com/docs/web/api/query/off.html).

Additional Mess:
Unfortunately an additional bug in Firebase (firebase/firebase-bower#6) means that until both bugs are fixed, the symptoms above will still exist. Firebase should compare the contexts to know that two listeners are different, but doesn't do that for the ChildEvent Listeners.

this.query.off(); called with no parameters closes all Firebase listeners at that location. It should instead be called with the original eventType, callback and context passed in.
@jshortall
Copy link
Contributor Author

I submitted a Google Corporate CLA this morning. Not sure how long they take to process!

mbleigh added a commit to mbleigh/firebase-element that referenced this pull request Jan 25, 2015
kevinpschaaf added a commit that referenced this pull request Feb 2, 2015
fix closeQuery to only close itself
@kevinpschaaf kevinpschaaf merged commit 99d8e94 into googlearchive:master Feb 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants