js: Don't mark requests caused by `__BACK__` as autorefresh

It's not an autorefresh and causes issues with form.js otherwise.
This commit is contained in:
Johannes Meyer 2021-02-05 16:38:17 +01:00
parent 11223aaf91
commit f2e53d420b
1 changed files with 6 additions and 2 deletions

View File

@ -516,11 +516,15 @@
$refreshTarget = $('#col1');
}
_this.loadUrl(refreshUrl, $refreshTarget).autorefresh = true;
var req = _this.loadUrl(refreshUrl, $refreshTarget);
req.addToHistory = false;
req.scripted = true;
setTimeout(function () {
// TODO: Find a better solution than a hardcoded one
_this.loadUrl(refreshUrl, $refreshTarget).autorefresh = true;
var req = _this.loadUrl(refreshUrl, $refreshTarget);
req.addToHistory = false;
req.scripted = true;
}, 1000);
$(window).off('popstate.__back__');