Fix waitingDialog being shown on browser history back (#5437)

* Fix waitingDialog being shown on browser history back

* Revert "Fix waitingDialog being shown on browser history back"

This reverts commit 1f56d97c69.

* Use pageshow-event as suggested by luelista
This commit is contained in:
Richard Schreiber
2025-09-09 08:31:03 +02:00
committed by GitHub
parent e34a3ab2ce
commit 38fae12c37

View File

@@ -48,8 +48,13 @@ function async_task_on_success(data) {
history.replaceState({}, "pretix", async_task_old_url);
}
}
if (!async_task_dont_redirect)
if (!async_task_dont_redirect) {
$(window).one("pageshow", function (e) {
// hide waitingDialog when using browser's history back
waitingDialog.hide();
});
location.href = data.redirect;
}
$(this).trigger('pretix:async-task-success', data);
}