Skip to content

Bind to Turbolinks or native load/unload events, not both #69

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

Merged
merged 3 commits into from
Sep 7, 2014
Merged

Bind to Turbolinks or native load/unload events, not both #69

merged 3 commits into from
Sep 7, 2014

Conversation

meleyal
Copy link
Contributor

@meleyal meleyal commented Jul 28, 2014

Since v2.0.0 Turbolinks fires the page:change event on DOMContentLoaded.

This was causing components rendered via react_ujs to be initialized twice, once on DOMContentLoaded, then again when Turbolinks fires its event.

@meleyal
Copy link
Contributor Author

meleyal commented Jul 28, 2014

I saw the same error locally when running the tests, but only intermittently. I think this is unrelated to the patch.

@meleyal
Copy link
Contributor Author

meleyal commented Aug 2, 2014

The failing tests seem to be related to #59

@xionon
Copy link
Contributor

xionon commented Aug 5, 2014

@meleyal once #76 gets merged in, the ReferenceError should stop popping up.

@jtmalinowski
Copy link
Collaborator

@meleyal #76 is in - can you retest?

@meleyal
Copy link
Contributor Author

meleyal commented Aug 14, 2014

@JakubMal tests are now passing

@zpao
Copy link
Member

zpao commented Sep 7, 2014

👍 Let's do it :)

zpao added a commit that referenced this pull request Sep 7, 2014
Bind to Turbolinks or native load/unload events, not both
@zpao zpao merged commit 6afb9f5 into reactjs:master Sep 7, 2014
@meleyal meleyal deleted the fix-events branch September 8, 2014 14:55
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

Successfully merging this pull request may close these issues.

4 participants