Skip to content

Close command palette on focus loss #8355

@Don-Vito

Description

@Don-Vito

Description of the new feature/enhancement

Currently we dismiss command palette programmatically if user clicks in the bounds of "Tab Content" (second grid row of the terminal page), however if the click is performed outside of these boundaries (e.g., outside of the terminal window or in the tab row) we do not dismiss the palette.

And this is problematic for many reasons.

Here is the simplest example - opening a tab while palette is open leaves it open an without a focus (meaning it can be closed only with mouse):

PaletteLostFocusOpenTab

Same can be achieved by clicking on menu, and then click outside of it (but now you cannot even type)

PaletteLostFocusOpenMenu

Same of course happens for the tab switcher
PaletteLostFocus

This might might be a root cause for #8319.

The idea here is to close the palette upon focus loss.
There are two approaches to it:

  1. Close the palette upon focus loss - this approach is taken in VS Code.
  • This approach is more hermetic
  • This approach introduces a more significant change in user experience, since now clicking another window closes the palette
  1. Close palette when clicking on the tab row (or more precisely on any row of the terminal page which is not the one that palette resides in)
  • This will have lesser impact on the experience
  • But it will not help us if the focus is somehow lost no by clicking
  1. Close palette when tabs items are modified

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CmdPalCommand Palette issues and featuresArea-UserInterfaceIssues pertaining to the user interface of the Console or TerminalHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions