You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bumping from v7.1.0 to v7.2.0 seems to be causing data-turbo-action: 'advance' to not update the URL when a link is inside a different turbo-frame.
Explanation
In v7.1.0, it was possible to have:
<%= turbo_frame_tag"modal"%><%= turbo_frame_tag "other_frame" do %>
<%= link_to"New post",new_post_path,data: {turbo_frame: "modal",turbo_action: 'advance'} %>
<% end %>
which would have the New post link render its response in the modal frame, and data-turbo-action: 'advance' was properly updating the URL to the /posts/new path:
With the bump to v7.2.0, it's still able to render the response in the modal frame, but the advance is no longer updating the URL.
Thanks for the workaround @pasl! I agree that GET should be the assumed default. It certainly seems like the PR you originally linked to (hotwired/turbo#636) touches related code even if it's not the smoking gun for this default assumption changing in v7.2.0.
It appears this issue is now resolved as part of v7.2.2. Perhaps thanks to hotwired/turbo#749 resolving a similar issue with navigation inside another <turbo-frame>.
TLDR
Bumping from v7.1.0 to v7.2.0 seems to be causing
data-turbo-action: 'advance'
to not update the URL when a link is inside a different turbo-frame.Explanation
In v7.1.0, it was possible to have:
which would have the
New post
link render its response in themodal
frame, anddata-turbo-action: 'advance'
was properly updating the URL to the/posts/new
path:With the bump to v7.2.0, it's still able to render the response in the
modal
frame, but theadvance
is no longer updating the URL.Reproduction
bin/rails db:migrate
bin/rails s
New post (from other_frame - broken)
does not update the URL to/posts/new
New post (not in a frame - advances)
does update the URL as expectedNew post (from the same frame - advances)
does update the URL as expectedv7.1.0_advance_works_fine
branch (which pins@hotwired/turbo
and@hotwired/turbo-rails
to v7.1.0)from other_frame
does update the URL to `/posts/new'Version information
Rails 7.0.4
Turbo-rails gem 1.3.0
@hotwired/turbo-rails 7.2.0
@hotwired/turbo 7.2.0
The text was updated successfully, but these errors were encountered: