Skip to content

Close the workspace menu before showing the delete dialog - #21017

Open
Kevin Wiblin (KevinWiblin) wants to merge 1 commit into
microsoft:mainfrom
KevinWiblin:fix/20636-workspace-menu-delete-dialog
Open

Kevin Wiblin (KevinWiblin) wants to merge 1 commit into
microsoft:mainfrom
KevinWiblin:fix/20636-workspace-menu-delete-dialog

Conversation

@KevinWiblin

@KevinWiblin Kevin Wiblin (KevinWiblin) commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Right-clicking a saved workspace in the workspace menu and choosing "Delete workspace?" opened the confirmation dialog, but the menu stayed open on top of it. The menu now closes before the dialog is shown.

References and Relevant Issues

Closes #20636

#20648 made the same change (plus hiding the "Delete workspace?" flyout, which already closes itself when its item is clicked) but was closed by its author before review.

Detailed Description of the Pull Request / Additional comments

The click handler for the "Delete workspace?" item in TerminalPage::_PopulateWorkspaceFlyout now calls _workspaceFlyout.Hide() before it builds and shows the ContentDialog. This is the same thing _newTabButton.Flyout().Hide() does for the new tab dropdown elsewhere in TerminalPage.

The existing call to _PopulateWorkspaceFlyout() after a confirmed delete is left as it was, so the menu is still rebuilt without the deleted workspace the next time it opens.

Validation Steps Performed

Built and deployed CascadiaPackage (Debug x64):

  • Before the fix: saved a workspace, opened the workspace menu, right-clicked the workspace and chose "Delete workspace?". The confirmation dialog appeared with the menu still open over it
  • After the fix, the same steps close the menu and show the dialog on its own
  • Cancel: the workspace is kept and still listed in the menu
  • Delete: the workspace is removed from the menu and from state.json
  • Opening a saved workspace from the menu still works
  • No crashes during any of the above

PR Checklist

Deleting a saved workspace from the workspace menu showed the
confirmation dialog while the menu stayed open on top of it. Hide
the menu first.

Closes microsoft#20636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The workspace menu stays open if I interact with the delete dialog

1 participant