Fix several issues around browser back navigation (#825)

This commit is contained in:
Sascha Ißbrücker
2024-09-15 08:28:49 +02:00
committed by GitHub
parent 74e65bc366
commit db225d5267
10 changed files with 64 additions and 23 deletions

View File

@@ -13,7 +13,10 @@ class ConfirmButtonBehavior extends Behavior {
}
destroy() {
Behavior.interacting = false;
this.reset();
this.element.setAttribute("type", this.element.dataset.type);
this.element.setAttribute("name", this.element.dataset.name);
this.element.setAttribute("value", this.element.dataset.value);
}
onClick(event) {
@@ -70,7 +73,10 @@ class ConfirmButtonBehavior extends Behavior {
reset() {
setTimeout(() => {
Behavior.interacting = false;
this.container.remove();
if (this.container) {
this.container.remove();
this.container = null;
}
this.element.classList.remove("d-none");
});
}