Skip to content

Conversation

@ekwoka
Copy link
Contributor

@ekwoka ekwoka commented Nov 28, 2024

Fixes #4449

Due to the location of the check for "has this element already been initialized", elements that were moved within an alpine component, without a new wrapper element, were being improperly marked as only having been removed, and we summarily cleaned up and not reinitialized.

this just moves that check to just before the element would be reinitialized (Should this check maybe just be part of the lifecycle instead of mutation entirely?)

Includes test for the case that fails if you revert the changes to the mutation code.

@calebporzio calebporzio merged commit cb08c46 into alpinejs:main Nov 28, 2024
1 check passed
@calebporzio
Copy link
Collaborator

Legend, thank you

@syrtsev-aleksandr
Copy link

Spended entire day to fix bug in my app related to this problem. Absolute legend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants