microsoft / microsoft/monaco-editor
Prevent formatDocument to steal focus
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
monaco-editor version: 0.15.6
Browser: chrome
OS: linux
I use this.editor.getAction('editor.action.formatDocument').run() to format a document. This works, but it also set's the focus to the the editor. Is that intended behaviour? Is there a way to disable the change of focus?
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 focus change in Chrome on Linux with Monaco Editor 0.15.6 using this.editor.getAction('editor.action.formatDocument').run(). Trace the formatDocument action's focus behavior and determine whether formatting can complete without moving focus; done means the document still formats while the previously focused element remains focused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100