microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.38k stars 29.32k forks source link

Aux window: `window.tabGroups.activeTabGroup` returns the wrong value when called from floating windows #215400

Closed geekley closed 4 months ago

geekley commented 5 months ago

Does this issue occur when all extensions are disabled?: Probably yes, but an extension is required to test

Steps to Reproduce:

  1. Make some extension that runs this from a command: console.log(window.tabGroups.activeTabGroup)
  2. Open 2 tabs (A and B), move tab B (e.g. a custom editor) to a floating window
  3. With tab B focused, run the command (e.g. through an editor/title button)
  4. Check the value returned in the console

Expected: The active tab group should be the one in the floating window, because it's the one focused and the one that ran the command.

What happened: Active tab group is the one in the main window. This is causing errors in my extension. If this is somehow expected behavior, then sorry but I couldn't find an API that works regardless of floating window.

vscodenpa commented 5 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.90.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

bpasero commented 5 months ago

I cannot reproduce, so this needs a minimal repro code.

vscodenpa commented 4 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!