Describe the bug
The editor (sometimes) loses focus when commands that open an interactive viewer are executed. We must then click again in the editor to get focus back.
To Reproduce
I am not able to always reproduce, but the editor often loses focus when executing with e.g.:
plot(mpg ~ hp, mtcars)
View(mtcars)
?plot
Can you fix this issue by yourself? (We appreciate the help)
No
Expected behavior
The editor should not lose focus when an interactive viewer is opened.
Environment (please complete the following information):
- OS: all
- VSCode Version: VSCodium 1.106.37943
- R Version: all
- vscode-R version: 2.8.6
Additional context
FWIW, RStudio editor does not lose focus when showing plots (e.g. plot(mpg ~ hp, mtcars)) or help (e.g. ?plot). With default layout, the editor lose focus when showing objects (e.g. View(mtcars)) because the viewer is open "on top" of the editor.