summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/features/stop-pjax-loading-with-esc.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/stop-pjax-loading-with-esc.tsx b/source/features/stop-pjax-loading-with-esc.tsx
index ab12c485..3d54a576 100644
--- a/source/features/stop-pjax-loading-with-esc.tsx
+++ b/source/features/stop-pjax-loading-with-esc.tsx
@@ -33,6 +33,8 @@ function keydownHandler(event: KeyboardEvent): void {
}
}
+ window.addEventListener('pjax:error', pjaxErrorHandler, {once: true});
+
history.back();
progressLoader.classList.remove(progressLoaderLoadingClass);
}
@@ -49,8 +51,6 @@ function init(): void {
window.addEventListener('keydown', keydownHandler);
- window.addEventListener('pjax:error', pjaxErrorHandler);
-
if (pageDetect.isUserProfile()) {
window.addEventListener('pjax:end', fixProfileNavAndTimeline);
}