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