mirror of
https://github.com/ae-utbm/sith.git
synced 2026-11-11 19:59:33 +00:00
Fix aria-busy when going backward on pages with htmx pagination
This commit is contained in:
1 file changed
+3
-3
@@ -1,11 +1,11 @@
|
|||||||
import htmx from "htmx.org";
|
import htmx from "htmx.org";
|
||||||
|
|
||||||
document.body.addEventListener("htmx:beforeRequest", (event) => {
|
document.body.addEventListener("htmx:beforeRequest", (event) => {
|
||||||
event.target.ariaBusy = true;
|
event.detail.target.ariaBusy = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
document.body.addEventListener("htmx:afterRequest", (event) => {
|
document.body.addEventListener("htmx:beforeSwap", (event) => {
|
||||||
event.originalTarget.ariaBusy = null;
|
event.detail.target.ariaBusy = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(window, { htmx });
|
Object.assign(window, { htmx });
|
||||||
Reference in new issue
Block a user