Skip to content
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

Activate script tags from turbo frames #192

Merged
merged 5 commits into from
Jun 22, 2021
Merged

Activate script tags from turbo frames #192

merged 5 commits into from
Jun 22, 2021

Conversation

xtr3me
Copy link

@xtr3me xtr3me commented Mar 2, 2021

When using a turbo frame the scripts returned from a turbostream are not evaluated and therefor not executed.
This PR adds the functionality to activate these script tags after they are inserted into the turbo-frame.

Fixes #186 for turbo-frames

Please let me know if additional fixes are needed for turbostream elements, I will add them accordingly 👍

@seanpdoyle seanpdoyle added the bug Something isn't working label Apr 1, 2021
@goncalvesjoao
Copy link

I'm kinda anxious for this fix, when can we see this in production guys? 👋

@dhh
Copy link
Member

dhh commented Jun 8, 2021

@xtr3me Can you have a look at the test failure?

@xtr3me
Copy link
Author

xtr3me commented Jun 14, 2021

@dhh I will look into this, before the end of this week. I'm currently in the midst of a renovation of the house, so I need to find some spare time to address this.

@xtr3me
Copy link
Author

xtr3me commented Jun 22, 2021

@dhh I have fixed the test failure. I did need to add an additional file as clicking on the link did not trigger an Turbo call anymore if it was clicked once before.

By changing the url of the link embedded in the response frame it worked again.

@dhh dhh merged commit 6ba296d into hotwired:main Jun 22, 2021
demir added a commit to demir/pinmapper that referenced this pull request Oct 16, 2021
turbo stream ile değiştirilen script kodu çalışmadığı için
geçici bir çözüm üretilmiştir
hotwired/turbo#192
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

Evaluate script tags from turbo streams
4 participants