hotwired / turbo

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

turbo:morph-element fires twice #1273

Open danielfriis opened 4 weeks ago

danielfriis commented 4 weeks ago

I need to reconnect a few Stimulus controllers after page has morphed.

To do that, I was making use of turbo:morph@window->controller#reconnect, but that doesn't get triggered when inside a Turbo Frame.

Then I switched to turbo:morph-element->controller#reconnect, which works, but fires twice.

I this expected behaviour, or am I missing something?