Closed phil-6 closed 1 month ago
@jorgemanrubia is the <turbo-stream action="refresh" request-id="...">
element meant for public consumption, or is it an implementation detail of broadcasts_refreshes
?
Guys, explain to me why when I click on links I am taken to the top, “scroll: :preserve” does not work turbo-rails v2.0.2 rails 7.1.3
<head>
....
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
<%= yield :head %>
</head>
worked well in --pre versions after update not work
@nikolaokonesh your question does not seem related to this issue, and might be better suited as an Issue of its own.
With that being said, are you confident that the <meta>
elements are being rendered into the document's <head>
? If you call turbo_refreshes_with
after the yield :head
call, does it behave as you'd expect?
@seanpdoyle I tried other options, it doesn't work.
I've opened https://github.com/hotwired/turbo-rails/pull/595 to implement this.
Attempting to user
format.turbo_stream { render turbo_stream: turbo_stream.refresh('target') }
Raises a
NoMethodError
:undefined method
refresh' for an instance of Turbo::Streams::TagBuilder`I think the new
refresh
action needs to be added into the TagBuilder model