htmx icon indicating copy to clipboard operation
htmx copied to clipboard

When there are multiple requests happening at the same time, sometimes the `htmx-request` class may not be removed

Open tarunbhardwaj opened this issue 1 year ago • 3 comments

When using the same loading indicator for multiple parallel requests in htmx, there is an issue where the internal request count here can inadvertently become negative, leading to the htmx-request class not being removed from the designated element(s) once all requests have completed.

tarunbhardwaj avatar Mar 27 '24 18:03 tarunbhardwaj

https://github.com/bigskysoftware/htmx/pull/2439 fixes this issue.

tarunbhardwaj avatar Mar 27 '24 18:03 tarunbhardwaj

I ran into this same issue. @tarunbhardwaj, do you plan on working on your fix anymore, or should someone else maybe look into picking it up?

jwendel avatar Jun 06 '24 04:06 jwendel

@jwendel I am looking for some suggestion on how to reproduce this race condition in test

tarunbhardwaj avatar Jun 18 '24 08:06 tarunbhardwaj