Updating Alpine.js to 3.16.2 breaks node ordering when using x-fragment.
It reliably reproduces with 3 items, with other counts it looks fine on a quick check.
<!doctype html>
<html>
<body>
<div x-data="{ items: [1, 2, 3] }">
<button type="button" @click="items.reverse()">Reverse</button>
<template x-for="n in items" :key="n">
<template x-fragment>
<span x-text="n"></span>:<span x-text="n"></span>
</template>
</template>
</div>
<script src="https://cdn.jsdelivr.net/npm/@ramstack/alpinegear-fragment@1.5.0/alpinegear-fragment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.16.2/dist/cdn.min.js"></script>
</body>
</html>
Updating Alpine.js to 3.16.2 breaks node ordering when using x-fragment.
It reliably reproduces with 3 items, with other counts it looks fine on a quick check.