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

quick-open: Esc closes inputbox when focus out. #12446

Merged

Conversation

FernandoAscencio
Copy link
Contributor

What it does

Closes: #6773
When notifications are showing the esc key will close those first before closing the quick input box. This behavior is consistent with VS Code.

How to test

  1. Run Theia
  2. Open a QuickInput that remains open when it is out of Focus
  3. Focus on something else (i.e. Editor, Tabs, etc)
  4. Press esc key
  5. Verify the QuickInput closes.

Review checklist

Reminder for reviewers

@FernandoAscencio FernandoAscencio force-pushed the fa/EscFunctionality branch 4 times, most recently from b70c268 to 69112d1 Compare April 25, 2023 21:00
@vince-fugnitto vince-fugnitto modified the milestone: 1.37.0 Apr 27, 2023
@vince-fugnitto vince-fugnitto added the monaco issues related to monaco label May 15, 2023
@@ -38,6 +38,9 @@ export class QuickCommandFrontendContribution implements CommandContribution, Ke
commands.registerCommand(CLEAR_COMMAND_HISTORY, {
execute: () => commands.clearCommandHistory(),
});
commands.registerCommand({ id: 'workbench.action.closeQuickOpen' }, {
Copy link
Member

@vince-fugnitto vince-fugnitto May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor - refactor the command to a constant (since it is referenced multiple times)?

export const CLOSE_QUICK_OPEN: Command = {
    id: 'workbench.action.closeQuickOpen'
}

It can live under packages/core/src/browser/quick-input/quick-command-service.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'll squash the commits while I am at it.

Closes: 6773

Signed-Off-By: FernandoAscencio <fernando.ascencio.cama@ericsson.com>
Co-Authored-By: vince-fugnitto <vincent.fugnitto@ericsson.com>
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks for making the updates!

@vince-fugnitto vince-fugnitto merged commit 15e7cd9 into eclipse-theia:master May 15, 2023
@vince-fugnitto vince-fugnitto deleted the fa/EscFunctionality branch May 15, 2023 17:21
@vince-fugnitto vince-fugnitto added this to the 1.38.0 milestone May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pressing Esc not closing input box when focus is out
2 participants