`raw-file-link` hangs the progress bar in PR comparisons forever #4143
altrisi posted onGitHub
When you click the View raw
button created by raw-file-link
in a PR, Github will understand it as a pjax request and won't ever reach the the raw file since a NetworkError will occur (CSP). Reloading the page then will, since the url has already been changed. Also works by middle-clicking the button, since it will open the url directly in a new tab.
Test URLs:
- https://github.com/sindresorhus/refined-github/pull/4134/files
- https://github.com/sindresorhus/refined-github/pull/4136/files
Console errors:
[Error] Content Security Policy: Las opciones para esta página han bloqueado la carga de un recurso en https://raw.githubusercontent.com/sindresorhus/refined-github/3f6bf6d9083d02851a7beaf9e16dbadefb697805/source/features/bugs-tab.tsx (connect-src).
(~"Options for this page have blocked the load of a resource at raw...
(connect-src
)")
[Error] Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.
ue pjax.ts:304
AsyncFunctionThrow self-hosted:694
(AsĂncrono: async)
execute navigation.ts:62
execute navigation.ts:17
X index.js:96
(AsĂncrono: EventListener.handleEvent)
o index.js:113
execute ajax-error.ts:51
register/e[i]< system-lite.js:20
(AsĂncrono: promise callback)
register system-lite.js:19
<anonymous> chunk-frameworks-b6fcaece.js:1
("AsĂncrono" == "async")
No console errors specifically from this feature, but (although it doesn't seem related), close-out-of-view-modals
threw Modal was closed too quickly. Disabled feature
.
Tested using Firefox in case it makes a difference. Also, it works correctly in commit pages.