5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 19:36:21 +00:00

fix: al salir de la página, cancelar todas las peticiones de htmx

closes #15880

closes #15881

closes #15883

closes #15884

closes #15893

closes #15894

closes #15973

closes #15974

closes #15975

closes #16003

closes #16004
This commit is contained in:
f 2024-04-10 12:15:30 -03:00
parent 629549c916
commit 7cca88b4f3
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,7 @@
// Cancela las peticiones pendientes de htmx para todos los elementos al
// cambiar de página.
document.addEventListener("turbolinks:click", () => {
for (const hx of document.querySelectorAll("[hx-get]")) {
window.htmx.trigger(hx, "htmx:abort");
}
});

View file

@ -7,3 +7,4 @@ import './timezone'
import './turbolinks-anchors'
import './validation'
import './new_editor'
import './htmx_abort'