Microsoft/monaco-editor

Prevent formatDocument to steal focus

Open

#1,245 opened on Dec 22, 2018

View on GitHub
 (2 comments) (1 reaction) (0 assignees)JavaScript (1,283 forks)batch import
feature-requesthelp wantedopen for PR

Repository metrics

Stars
 (14,836 stars)
PR merge metrics
 (Avg merge 6h 26m) (15 merged PRs in 30d)

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