Skip to content

Commit 871783e

Browse files
authored
Merge pull request #136 from scala/backport-lts-3.3-22013
Backport "[ISSUE-scala#19208] If scaladocs on file protocol don't do SPA routing." to 3.3 LTS
2 parents a07dd2c + 6cdbc77 commit 871783e

File tree

1 file changed

+5
-0
lines changed
  • scaladoc/resources/dotty_res/scripts

1 file changed

+5
-0
lines changed

scaladoc/resources/dotty_res/scripts/ux.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ function attachAllListeners() {
167167
if (url.origin !== window.location.origin) {
168168
return;
169169
}
170+
// ISSUE-19208, treat as normal link when lacking HTTP server,
171+
// otherwise GET request blocked by CORS protections.
172+
if (window.location.protocol.startsWith("file")) {
173+
return;
174+
}
170175
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) {
171176
return;
172177
}

0 commit comments

Comments
 (0)