microsoft / microsoft/monaco-editor
[Bug] Loading files from local server causes a bug when typing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
Reproduction Steps
No response
Actual (Problematic) Behavior
Text randomly gets appended or dissapears
(Shown using local files)
https://github.com/user-attachments/assets/94b76cff-4e74-44cd-bb76-b1c715fb5eae
Logs also return 'undefined'
Expected Behavior
Typing works normally without any anomalies
https://github.com/user-attachments/assets/e1c9688b-22b9-4703-9592-bcc12a8ddf86
Additional Context
Use local files instead of the unpkg links in your html file
Example
<script src="editor/codeEditors/monaco/loader.js"></script>
<script src="editor/codeEditors/monaco/mainnls.js"></script>
<script src="editor/codeEditors/monaco/main.js"></script>
When I use the default unpkg files the editor works fine
<script src="https://unpkg.com/monaco-editor@0.34.0/min/vs/loader.js"></script>
<script src="https://unpkg.com/monaco-editor@0.34.0/min/vs/editor/editor.main.nls.js"></script>
<script src="https://unpkg.com/monaco-editor@0.34.0/min/vs/editor/editor.main.js"></script>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the local editor/codeEditors/monaco/loader.js, mainnls.js, and main.js files, then compare it with the corresponding unpkg Monaco 0.34.0 files. Check the browser behavior and logs while typing; done means local files no longer append or lose text and typing matches the unpkg setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100