-
Notifications
You must be signed in to change notification settings - Fork 38k
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberIssue has been confirmed by VS Code Team memberregressionSomething that used to work is now brokenSomething that used to work is now brokenworkbench-tabsVS Code editor tab issuesVS Code editor tab issues
Milestone
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: Works <= 1.89.1, broken >= 1.90.2
- OS Version: Linux x64 6.1.0-23-amd64
We develop an extension in which an existing tab gets replaced by a webview. We simply store a reference to the existing tab, open a webview and then close the original tab. This has worked fine up to version 1.89.1. On version >= 1.90.2 closing the tab using vscode.window.tabGroups.close fails with the exception Tab close: Invalid tab not found!. The tab has not been closed in the meantime nor did we get any close notifications for it via vscode.window.tabGroups.onDidChangeTabs.
Steps to Reproduce:
- Create an extension with the following function exposed as command:
async dummy(): Promise<void> {
const tab = vscode.window.tabGroups.activeTabGroup.activeTab;
if (!tab) {
console.log("Please open a tab to test this code.");
return;
}
const panel = vscode.window.createWebviewPanel(
"TestPanel",
"Test",
tab.group.viewColumn);
panel.webview.html = "<body>Hello World</body>";
// Introduce a tiny delay
await panel.webview.postMessage("hello");
vscode.window.tabGroups.close(tab);
}- Open some tab and call the command
- Check the debug console for the
Tab close: Invalid tab not found!exception.
Reactions are currently unavailable
Metadata
Metadata
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberIssue has been confirmed by VS Code Team memberregressionSomething that used to work is now brokenSomething that used to work is now brokenworkbench-tabsVS Code editor tab issuesVS Code editor tab issues