hotwired / stimulus

A modest JavaScript framework for the HTML you already have

Home Page:https://stimulus.hotwired.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Progress bar keeps on loading forever

DavidPetrasek opened this issue · comments

When using Turbo-Drive and after visiting a link which returns a turbo stream response (text/vnd.turbo-stream.html) everything works, except the blue progress bar on top keeps on loading even though the request was already completed. After 10 minutes, the bar's width reaches around 800% and keeps growing this:
<div class="turbo-progress-bar" style="width: 756.312%; opacity: 1;"></div>

I know I can also use Turbo-Frames to achieve this, but in this case I need to use Turbo-Streams.

To reproduce in Symfony

Symfony route which is triggered after visiting a link:

 #[Route('/turbo-stream', name: '_turbo_stream')]
 public function turbo_stream (Request $request) : Response
 {
     $request->setRequestFormat(TurboBundle::STREAM_FORMAT);

     return $this->render('template.stream.html.twig');
 }

template.stream.html.twig:

<turbo-stream action="update" target="some_target">
    <template>

        <div class="">
           something....
        </div>

    </template>
</turbo-stream>