wire-elements / modal

Livewire component that provides you with a modal that supports multiple child modals while maintaining state.
MIT License
1.09k stars 129 forks source link

After last AlpineJs upgrade, modals are not displaying anymore #423

Closed giovanniledda closed 4 months ago

giovanniledda commented 4 months ago

This new release:

https://github.com/alpinejs/alpine/releases/tag/v3.13.6

introduces a breaking bug: a "display:none" is injected in the code (in this div: image_2024_03_06T11_47_12_975Z) and makes modals impossible to display (you can only see the dark background).

I "solved" (but it's not a fix, of course) by manually forcing the import to the previous release:

from:

<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>

to:

<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.5/dist/cdn.min.js"></script>

bielcode commented 4 months ago

I racked my brain for a while until I found this problem, I wish I had seen your post here straight away, I only saw it when I came to publish the problem haha

PhiloNL commented 4 months ago

Looking into it. More reports are coming in about v3.13.6 (https://github.com/alpinejs/alpine/discussions/4080)

PhiloNL commented 4 months ago

@giovanniledda are you using Livewire 2 or 3?

PhiloNL commented 4 months ago

@giovanniledda can you try the just-tagged Alpine v3.13.7 and see if that solves the issue?

PatrickePatate commented 4 months ago

@giovanniledda can you try the just-tagged Alpine v3.13.7 and see if that solves the issue?

It's ok for me after the v3.13.7 release.

I was using Alpine from https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js

giovanniledda commented 4 months ago

@giovanniledda can you try the just-tagged Alpine v3.13.7 and see if that solves the issue?

Nice...this version solves the issue. I'm using Livewire 2, by the way. Other projects, where I'm using Livewire 3, don't suffer from the issue.

PhiloNL commented 4 months ago

Yeah, it's been a bit of a search, been trying to figure this out the entire morning to figure out where exactly the bug exists and it seems to be isolated to Livewire v2 in combination with Alpine v3.13.6. The change in this version stopped Alpine from picking up any morph changes or in this case, it did not remove display:none anymore.

Happy that it has been resolved.