katalyst / kpop

MIT License
4 stars 1 forks source link

content_for kpop doesn't load scrim #17

Closed AlanCornthwaiteKatalyst closed 2 months ago

AlanCornthwaiteKatalyst commented 10 months ago

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.

sfnelson commented 2 months ago

Verified that this has been fixed in the latest version (e.g. fringe performance modal on event page).