hotwired / turbo

The speed of a single-page web application without having to write any JavaScript
https://turbo.hotwired.dev
MIT License
6.72k stars 428 forks source link

Morph skip render some elements #1286

Closed le0pard closed 2 months ago

le0pard commented 3 months ago

Page with <meta name="turbo-refresh-method" content="morph">. Next we have page with content:

<%= turbo_stream_from @incoming_bill %>

<div class="bill-entry">
  <div class="bill-preview">
    <div class="form-fieldset mb-2">
      <div class="form-row justify-between">
        <div>
          <h1>Hello</h1>
        </div>
      </div>
    </div>
  </div>
</div>

If I change page by Turbo::StreamsChannel.broadcast_refresh_to incoming_bill, it render some svg and render back this view, it will skip to render all after <div class="form-fieldset mb-2">. But it still visible in network, that backend send whole content. After page refresh content show as expected.

Also no such issue with replace refresh mode, only with morph.

Here video:

https://youtu.be/O9w_W2Eydxw

le0pard commented 2 months ago

After long days of debugging I find out, that https://github.com/airbnb/lottie-web was a reason of such issues