htmx
htmx copied to clipboard
History support and `loading-states` extension don't play nice with each other
From discord
https://discord.com/channels/725789699527933952/725789747212976259/1036761999385829386
hx-push-url doesn't work well with loading-states: if I go backwards (push back button) all elements with data-loading-disable become disabled I assume it's because loading-states first adds disabled attribute and only then hx-push-url captures current DOM (together with disabled attribute)
by Gedis
Workaround is adding a delay, but ideally this maybe could be fixed. Opening an issue for tracking purposes
As a possible proper fix, cleanup should happen on htmx:beforeOnLoad instead of htmx:afterOnLoad, needs testing
Fixed in dev