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

focusSideBar opens file #87524

Closed
mchels opened this issue Dec 21, 2019 · 3 comments
Closed

focusSideBar opens file #87524

mchels opened this issue Dec 21, 2019 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded
Milestone

Comments

@mchels
Copy link

mchels commented Dec 21, 2019

Issue Type: Bug

  1. Open a workspace.
  2. Close all open files.
  3. Open any file from the sidebar explorer.
  4. Close that file (now you should have no open files and the file you opened in the Explorer should be highlighted, and the editor, not the sidebar explorer, should have focus).
  5. Invoke workbench.action.focusSideBar (I use shift+alt+e).

Actual behavior:
The Explorer window is in focus AND the highlighted file is opened.

Expected behavior:
The Explorer window is in focus. No file should be opened.

This only happens if there are no open files when focusSideBar is invoked. It has been an issue in a couple of vscode versions, so it's not a 1.41 thing.

VS Code version: Code 1.41.1 (26076a4, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18362
Remote OS version: Linux x64 4.15.0-1051-aws

edited for clarity: "focused file" -> "highlighted file"

@isidorn
Copy link
Contributor

isidorn commented Dec 23, 2019

Somewhat dup of #83028 and oposite of #67708

Bottom line: we behave like this from day one and changing it might break some muscle memory of users.
I will leave this open as a feature request and I might change this in the future (potentially adding a setting so this can be controlled by the users)

@isidorn isidorn added feature-request Request for new features or functionality file-explorer Explorer widget issues and removed new release labels Dec 23, 2019
@isidorn isidorn added this to the Backlog milestone Dec 23, 2019
@isidorn isidorn closed this as completed in a8a0138 Feb 7, 2020
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Feb 7, 2020
@isidorn isidorn modified the milestones: Backlog, February 2020 Feb 7, 2020
@isidorn
Copy link
Contributor

isidorn commented Feb 7, 2020

After more feedback from users we decided to no longer automatically open editors from the explorer if no editor opened. I personally found this behavior overly smart and counter intuitive sometimes. Let's see the user feedback on this change.

fyi @webczat so now your issue should be fixed as well

@webczat
Copy link

webczat commented Feb 7, 2020

I am currently not fully certain if this is the same issue. I have experienced this one too and didn't quite know how to reproduce it, but at first glance the issue with opening a focused file when pressing enter after typing filename for new file may be something different. When I have a version of vscode with the fix for this I can likely test.

@dbaeumer dbaeumer added the verified Verification succeeded label Feb 27, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 23, 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 file-explorer Explorer widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants