-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus is repeatedly stolen from terminal #125800
Comments
Is one of your extensions causing this? Maybe use the "Start Extension Bisect" command to investigate. |
Possibly, I think it only happens if something decides it's a good idea to update the world. I'd bet on Thing is, I've opened this project a number of times, and this was the first time it decided to do this, so I'm not precisely sure what caused it to decide to do something... Here's the beginning of the output tab:
|
I get messages saying that That said. Personally, I'd rather VSCode be immune to this behavior than play whack-a-mole with individual misbehaving extensions. Reproduced:
|
@jsoref we provide the API and we strive not to break API. Whack-a-mole is the way to go unfortunately as there are very legitimate uses for this and it would always be possible anyway by extensions running commands to show the output. |
I'm glad to hear you care about APIs. I'm an ex-browser developer. And web browsers care about APIs and compatibility too. There is a very basic DOM API It turns out that user's experience was more important than imaginary API fidelity. |
Right but even if we wanted to remove the API to show an output channel, you would still be able to do it with a command anyway since they're available to extensions, there are plenty of other commands that can play with focus too. But regardless, showing an extensions output channel is a very common thing to do, omnisharp probably just have a bug they need to fix. cc @sandy081 just in case this is a bug on our end, omnisharp seems to be preserving focus https://github.com/OmniSharp/omnisharp-vscode/blob/d1785942e51f3afee1d8e62b406ee46b35168c63/src/observers/OmnisharpChannelObserver.ts#L34 |
The C# extension provides a setting ( |
@Tyriar: I'm not saying something shouldn't happen in response to the API call. But, if another tab in the same set is currently focused, instead of switching the active tab, just paint the tab an attention (highlight) color and leave the focus alone. Focus stealing is a very major anti-pattern. Especially if a user might be, e.g. entering a password, or a command which if incompletely entered could destroy something. |
I just checked and preserve focus is working as expected. |
Issue Type: Bug
output.steals.focus.from.terminal.mov
VS Code version: Code 1.56.2 (054a929, 2021-05-12T17:44:30.902Z)
OS version: Darwin x64 19.6.0
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (55)
A/B Experiments
The text was updated successfully, but these errors were encountered: