Skip to content
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

Editor not taking the focus back on maximized Panel closing. #89688

Closed
vdegenne opened this issue Jan 30, 2020 · 6 comments
Closed

Editor not taking the focus back on maximized Panel closing. #89688

vdegenne opened this issue Jan 30, 2020 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues verified Verification succeeded
Milestone

Comments

@vdegenne
Copy link

  • VSCode Version: 1.41
  • OS Version: Fedora/Linux

reproduction

The video starts after the white screen. Then

  • (cursor in editor)
  • I press the shortcut to trigger the panel maximization (cursor in terminal)
  • I press it again to close the panel/terminal
  • (where is the cursor ?)

Consequences :

  • I press the shortcut but because the cursor is not in the editor anymore the "when" becomes useless and the default behavior is chosen instead.

Anyway all I try to prove here is that the editor focus is lost when closing the panel with a shortcut only when it's maximized.

Please consider this annoyance as it looks like a bug. Or at least if you don't see that as a bug (because the maximized panel behavior is only meant to be triggered when the panel is already open) see this as a Feature Request. You see from my video on small size window it'd be nice to have a mechanism to open the terminal in all the available space (as if it was just another editor window).

Thanks in advance.

@Calebyang93
Copy link

Hi what is the expected result when you do that? The problem you are facing is the editor focus disappears when you close the panel with a short cut key? How do you want us to fix the bug?

@vdegenne
Copy link
Author

vdegenne commented Jan 30, 2020

Sorry if it is a bit confusing but I don't understand why the panel has a different behavior when it's maximized or not, that is why I think it must be regarded as a bug, maximized or not the panel should always put the cursor back in the editor when it's closed with the same function.
I also saw other people complaining about this behavior before.

I remade a screencast for more understanding of what is actually going on (with the default keybindings)

I bash Ctrl+` multiple times to show you that the cursor is returned into the editor when the panel is not maximized and closed.
But then if I maximize it (dragged with the mouse in the video) and press Ctrl+` to close as you can see the cursor is not focus in the editor anymore (maybe it's focus in the panel which is now hidden).

Hope it makes sense to you. I am from a Emacs background, our philosophy is not trying to use the mouse at all when coding. I've been trying to tweak and find a way around to just toggle maximized panel in and out with a unique shortcut but because of this little detail I can't seem to make it work.

Hope you consider this.

@Calebyang93
Copy link

Sorry if it is a bit confusing but I don't understand why the panel has a different behavior when it's maximized or not, that is why I think it must be regarded as a bug, maximized or not the panel should always put the cursor back in the editor when it's closed with the same function.
I also saw other people complaining about this behavior before.

I remade a screencast for more understanding of what is actually going on (with the default keybindings)

I bash Ctrl+ multiple times to show you that the cursor is returned into the editor when the panel is not maximized and closed. But then if I maximize it (dragged with the mouse in the video) and press Ctrl+ to close as you can see the cursor is not focus in the editor anymore (maybe it's focus in the panel which is now hidden).

Hope it makes sense to you. I am from a Emacs background, our philosophy is not trying to use the mouse at all when coding. I've been trying to tweak and find a way around to just toggle maximized panel in and out with a unique shortcut but because of this little detail I can't seem to make it work.

Hope you consider this.

Hey @vdegenne , I understand the issue better. Let me work on resolving it. Hope you will be patient for us to resolve the bug. What machine are you using (Windows/Mac/Linux)?

@vdegenne
Copy link
Author

@Calebyang93 Sure I know how to be patient when I know people are working hard behind!
I am running a Linux system (Fedora stretch 31).
Also this stackoverflow is the most accurate one I find about the issue I mentioned. The validated answer there is providing this solution :

{
    "key": "ctrl+alt+q",
    "command": "workbench.action.toggleMaximizedPanel",
    "when": "!terminalFocus"
},
{
    "key": "ctrl+alt+t",
    "command": "workbench.action.closePanel",
    "when": "terminalFocus"
}

BUT it doesn't work in my case. Now I don't know if it's because the post is old and maybe this issue occurred from a software update or if it's because I am running a linux system. If someone could try on a Windows system that'll give more insight.

Another thing, it's not related to a shortcut issue, as I tried in a vanilla version. The issue is specific to the panel design.

@Calebyang93
Copy link

@Calebyang93 Sure I know how to be patient when I know people are working hard behind!
I am running a Linux system (Fedora stretch 31).
Also this stackoverflow is the most accurate one I find about the issue I mentioned. The validated answer there is providing this solution :

{
    "key": "ctrl+alt+q",
    "command": "workbench.action.toggleMaximizedPanel",
    "when": "!terminalFocus"
},
{
    "key": "ctrl+alt+t",
    "command": "workbench.action.closePanel",
    "when": "terminalFocus"
}

BUT it doesn't work in my case. Now I don't know if it's because the post is old and maybe this issue occurred from a software update or if it's because I am running a linux system. If someone could try on a Windows system that'll give more insight.

Another thing, it's not related to a shortcut issue, as I tried in a vanilla version. The issue is specific to the panel design.

Ok i have to check the code base and get back to you if it is local or vs code based problem. Thanks for troubleshooting and finding possible solutions while we maintain the code base.

@albjeremias
Copy link

When I change workspace on xfce4 i also loose the focus of the mouse cursor from visual code.. i wonder if its the same issue..

@sbatten sbatten added bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues labels Feb 21, 2020
@sbatten sbatten added this to the February 2020 milestone Feb 21, 2020
@dbaeumer dbaeumer added the verified Verification succeeded label Feb 27, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants