htmx icon indicating copy to clipboard operation
htmx copied to clipboard

History support and `loading-states` extension don't play nice with each other

Open Renerick opened this issue 3 years ago • 1 comments

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

Renerick avatar Oct 31 '22 22:10 Renerick

As a possible proper fix, cleanup should happen on htmx:beforeOnLoad instead of htmx:afterOnLoad, needs testing

Renerick avatar Oct 31 '22 22:10 Renerick

Fixed in dev

Renerick avatar Nov 09 '22 17:11 Renerick