diff --git a/app/assets/javascripts/outfit-viewer.js b/app/assets/javascripts/outfit-viewer.js index 20bf3fcb..1e9d29f5 100644 --- a/app/assets/javascripts/outfit-viewer.js +++ b/app/assets/javascripts/outfit-viewer.js @@ -396,6 +396,13 @@ class OutfitViewerPlayPauseToggle extends HTMLElement { "outfit-layer:state(has-animations)", ) !== null, ); + + // After a Turbo morph, Idiomorph may remove our `hidden` attribute + // (since the server HTML never includes it). Re-apply visibility + // based on the current animation state. + document.addEventListener("turbo:render", () => { + this.#syncFromOutfitViewer(); + }); } #syncFromOutfitViewer() {