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

Don't attach UJS form submission handlers to Turbo forms #521

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

dhh
Copy link
Member

@dhh dhh commented Jun 14, 2021

If you're migrating an application written for Rails UJS to the new Turbo framework in Hotwire, you might well want to have Turbo and UJS coexisting during the migration (or forever!). To do this, you need a way to distinguish how handles form submissions. With these updated selectors, Rails UJS will leave forms marked with data-turbo=true alone, leaving them to be processed by Turbo.

(Mirror PR of rails/rails#42476).

Allows for easier migration of apps written for UJS, such that new work can be done with Turbo forms that are marked with data-turbo=true.
@donni106
Copy link

a remote form in our project fails now with 1.2.3. we thought of problems with assets and precompiling, as we updated server and setups.
now after hours we found out, that switching back to 1.2.2 fixed it!
i cannot see a reason looking at the changes here in the PR, but wanted to let you know.
weird, but we will remain on 1.2.2 (fyi @marcometz).

@dhh
Copy link
Member Author

dhh commented Aug 26, 2021

Please do open a PR when you find a solution ✌️

carlosantoniodasilva added a commit to rails/jquery-rails that referenced this pull request Nov 10, 2022
It contains improved compatibility with turbo.
rails/jquery-ujs#521

Closes #284
smartech7 pushed a commit to smartech7/jquery-rails that referenced this pull request Aug 4, 2023
It contains improved compatibility with turbo.
rails/jquery-ujs#521

Closes #284
@nanaya
Copy link

nanaya commented Oct 29, 2024

I wonder if it's something to do with jquery not declared as dependency in 1.2.3...

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.

3 participants