diff options
author | 2020-09-22 02:26:07 +0300 | |
---|---|---|
committer | 2020-09-21 18:26:07 -0500 | |
commit | 835b0a0d6d1b5cbb60e7a93cf43b3535602e599e (patch) | |
tree | 7ec0913c09b940e029027f497e5bb608f8d42e75 | |
parent | a50690c4f5e53820d4c84bd2ecfabe49aab98da7 (diff) | |
download | refined-github-835b0a0d6d1b5cbb60e7a93cf43b3535602e599e.tar.gz refined-github-835b0a0d6d1b5cbb60e7a93cf43b3535602e599e.tar.zst refined-github-835b0a0d6d1b5cbb60e7a93cf43b3535602e599e.zip |
Avoid repository settings bug caused by `stop-pjax-loading-with-esc` (#3585)
-rw-r--r-- | source/features/stop-pjax-loading-with-esc.tsx | 4 |
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); } |