mirror of
https://github.com/pretix/pretix.git
synced 2026-04-26 23:52:35 +00:00
Add workaround for issue with "back" button in Safari
This commit is contained in:
@@ -228,6 +228,17 @@ $(function () {
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
window.addEventListener("pageshow", function (evt) {
|
||||
// In Safari, if you submit an async task, then get redirected, then go back,
|
||||
// Safari won't reload the HTML from disk cache but instead reuse the DOM of the
|
||||
// previous request, thus not clearing the "loading" state.
|
||||
if (evt.persisted && $("body").hasClass("loading")) {
|
||||
setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 10);
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
var waitingDialog = {
|
||||
|
||||
Reference in New Issue
Block a user