-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Statusbar buttons are not giving back the keyboard focus to the editor #145432
Comments
The fact that keyboard focus remains in the status bar is likely for accessibility reasons. And why can the extension not simply pass focus back to the editor? |
Of course it is possible to give the focus back to the editor using extensions. I described a workaround for that in the linked report, by adding "workbench.action.focusActiveEditorGroup" to the wanted command with the help of multi-command extension. The thing is that such behavior is inconsistent and unneeded:
|
The status bar part is really just executing commands:
It does not do anything with regards to focus or not. It is up to the command to focus the editor or not focus the editor. I would argue the status bar does everything right and if there is a command that steals focus from the status bar, then I would have a discussion with the specific command whether that makes sense or not. Can you give an example of a command (from us, not from an extension) that should behave differently? |
I don't know how your program works internally. I am just beginner with it and I sorry for my ignorance. I am looking at this as an average user and as a user I see this behavior inconsistent, as I explained already:
|
I have no "Save" command in the status bar, nor do I have "Undo/Redo". We do not ship these commands by default. It sounds to me you have some kind of extension installed, then I suggest to file the issue against the extension. |
Yes, I posted the issue to the author of the extension who suggested that I post issue to you. As I already mentioned, the problem is not with single extension, but with all extensions that are creating statusbar buttons. All these extensions use the same, standard API for executing commands, exposed by VSCode. By the way, here is the more detail list of commands that are not giving back focus:
And here are the commands that are giving back focus to the editor.
|
Does this issue occur when all extensions are disabled?: No, but I think the problem is with the VBCode extensions API.
Steps to Reproduce:
There are several extensions that I tried, which have possibility to create custom status bar buttons that allow executing of specified VSCode commands, including the mentioned one and the Commands extension, that have the same problem. So, I don't think that the problem is with these extensions, but with the VSCode API exposed by the program that they are using.
There are many VSCode commands, which could be assigned to the status bar buttons with the help of these extensions, that are not giving back the focus to the editor like these:
On other side, there are some commands that are not stealing the focus from editor, like these:
If you are interested in more details about this problem, you could read my report to the author of the statusbar-commands extension where I described a workaround for this problem using another extension.
The text was updated successfully, but these errors were encountered: