fix(js): release superseded latest pending state

When data-slhx-policy=latest aborts an in-flight request, release that request's pending UI bookkeeping before starting the replacement request so pending classes, indicators, and disabled controls do not leak.

req: convention/006

req: convention/007
This commit is contained in:
slhx agent
2026-06-01 20:20:26 +02:00
parent 31b812f557
commit e6486c1b35
2 changed files with 13 additions and 1 deletions
+4 -1
View File
@@ -174,7 +174,10 @@
const policy = requestPolicy(target, eventName);
const active = pending.get(target);
if (active && policy === "drop") return;
if (active && policy === "latest") active.abort.abort();
if (active && policy === "latest") {
active.abort.abort();
showPending(target, false);
}
if (active && policy === "queue") {
const base = queues.get(target) || active.done;
let queued;