dotnet / dotnet/docfx

[Bug] StaticTOC search function does not work on Edge or Firefox

Open
#10,190 2 comments 0 reactions 0 assignees View on GitHub
template
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Describe the bug**
I've made a documentation site using StaticTOC. The search function does not work at all on Edge (it just reloads the current page) and on Firefox it gets stuck on a loading wheel.

On Edge the console says: "SecurityError: failed to contruct 'Worker': Script at '...' cannot be accessed from origin 'null'

On Firefox I get the following:

```
Error occurred at search-worker. message: undefined docfx.js:169:17
onerror docfx.js:169
(Asíncrono: EventHandlerNonNull)
webWorkerSearch docfx.js:168
enableSearch docfx.js:134
docfx.js:14
jQuery 13
O docfx.vendor.min.js:1
docfx.vendor.js:7
docfx.vendor.js:17
```

**To Reproduce**
Steps to reproduce the behavior:
1. Open the generated doc site.
2. Try to search for something.

**Expected behavior**
Show the sarch results.

**Context (please complete the following information):**
- OS: Windows
- Docfx version: 2.77.0

**Additional context**
This is a work laptop, so it's possible that some security restrictions imposed by IT are causing this problem.

I'm using the statictoc template, and am accessing the site through the file:// protocol.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.