When rendering an inline modal using content_for(:kpop) the scrim doesn't show.
Scrim controller is loading after kpop is already loaded, so although the scrim:show event is fired, the scrim controller is not yet listening so its show method never gets called.
Workaround
Instead of loading kpop via content_for tags load a stimulus controller with the kpop path value(set src in the kpop tag), so that once the stimulus controller is attached to DOM, we can load the kpop content.
When rendering an inline modal using
content_for(:kpop)
the scrim doesn't show.Scrim controller is loading after kpop is already loaded, so although the scrim:show event is fired, the scrim controller is not yet listening so its show method never gets called.
Workaround Instead of loading kpop via content_for tags load a stimulus controller with the kpop path value(set src in the kpop tag), so that once the stimulus controller is attached to DOM, we can load the kpop content.