Skip to content

Only use turbolinks events if supported #93

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

Conversation

felixbuenemann
Copy link
Contributor

The current code always uses Turbolinks events if it is loaded, but this
doesn't mean it is supported by the browser. This change checks if
turbolinks is supported and otherwise uses the native event handlers.

Without this fix ujs components are not rendered in IE8.

The current code always uses Turbolinks events if it is loaded, but this
doesn't mean it is supported by the browser. This change checks if
turbolinks is supported and otherwise uses the native event handlers.

Without this fix ujs components are not rendered in IE8.
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@felixbuenemann
Copy link
Contributor Author

I've signed the CLA, not sure why the bot isn't posting that. I've mailed [email protected] for clarification.

@rmosolgo
Copy link
Member

👏 👏 thank you for finding this and fixing it! 👍

@felixbuenemann
Copy link
Contributor Author

Btw. this also seems to be fixing a checksum error I was seeing with server side rendering in IE8.

Before this change I was getting the following error when refreshing a pre-rendered component using js:

React attempted to use reuse markup in a container but the checksum was invalid. [...]

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@jtmalinowski
Copy link
Collaborator

@felixbuenemann should we have any tests here?

@felixbuenemann
Copy link
Contributor Author

@JakubMal What would you test? You could stub out Turbolinks.supported to simulate an unsupported browser, but I'm not sure that would be that useful.

@zpao
Copy link
Member

zpao commented Oct 9, 2014

Probably fine without tests. I'll leave it to you @JakubMal

@jtmalinowski
Copy link
Collaborator

This is an IE8 regression, so how about we create Sauce Labs account for cases like this? (this way we can automatically test browsers we want to support - probably the same browsers React support.
@zpao would you mind setting up "Open Source" Sauce Labs account for us?

@rmosolgo
Copy link
Member

👍 this is a definite improvement, right? browser testing would be nice but does this have to be blocked in the meantime?

@rmosolgo rmosolgo mentioned this pull request Dec 18, 2014
3 tasks
rmosolgo pushed a commit that referenced this pull request Jan 6, 2015
…handler-fix

Only use turbolinks events if supported
@rmosolgo rmosolgo merged commit 579a91a into reactjs:master Jan 6, 2015
@felixbuenemann
Copy link
Contributor Author

Thanks, @rmosolgo!

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.

5 participants