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

When a new window is open, focus still remains on previously focused window #149043

Closed
garyking opened this issue May 8, 2022 · 7 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@garyking
Copy link

garyking commented May 8, 2022

Issue Type: Bug

  1. Have a VSC window already open and in focus.
  2. Open a VSC workspace file.
  3. While the workspace is loading, press Cmd-N to open a few tabs in the new workspace. The tabs will not appear in the new window, and will in fact appear in the previously focused window.

This occurs for all keyboard shortcuts, such as Cmd-W, which would close tabs in the previous window. Mouse commands like double-clicking on an empty space to create a new tab are not affected by this bug. This bug started happening with VSC 1.67.0 from a few days ago. Already tested with all extensions disabled.

Example as seen below, where I have a workspace opened (Finder), then open another one (Streaks), hit Cmd-N a few times, return back to first workspace (Finder), and see the tabs there rather than the new workspace.

VSC - tabs open in old window

VS Code version: Code 1.67.0 (57fd6d0, 2022-05-04T12:14:47.100Z)
OS version: Darwin x64 19.6.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 4, 4, 4
Memory (System) 16.00GB (2.60GB free)
Process Argv --crash-reporter-id 33166f13-0cd4-4333-aabf-41b2210e787b
Screen Reader no
VM 0%
@garyking
Copy link
Author

Okay so it's a bit more clear as to what's happening. When I open a workspace in VSC, the window opens and is at the front, but focus remains on the previous window, which I can tell because the top-left corner buttons of the window on Mac are greyed out, rather than colored Red, Yellow, Green.

Screenshot of how the top-left corner of a new workspace window looks when opened in VSC:

VSC top left Mac buttons

@garyking
Copy link
Author

To further simplify the issue, when I go to File > New Window in VSC, the new window is not focused.

@garyking garyking changed the title While a workspace is loading, keyboard shortcuts are sent to VSC window with most recent focus, not current workspace When a new window is open, focus still remains on previously focused window May 24, 2022
@bpasero bpasero added this to the May 2022 milestone May 27, 2022
@bpasero
Copy link
Member

bpasero commented May 27, 2022

Similar to #149067

@bpasero
Copy link
Member

bpasero commented May 27, 2022

Do you have "window.newWindowDimensions": "maximized" configured?

@smnbbrv
Copy link

smnbbrv commented May 27, 2022

Yes, I have this issue and have this "window.newWindowDimensions": "maximized" as configuration

@bpasero
Copy link
Member

bpasero commented May 27, 2022

/duplicate #149394

@VSCodeTriageBot VSCodeTriageBot added the *duplicate Issue identified as a duplicate of another issue(s) label May 27, 2022
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

6 participants
@garyking @bpasero @smnbbrv @joyceerhl @VSCodeTriageBot and others