The first keystroke after dismissing the find dialog is eaten #5602

Closed
opened 2026-01-31 00:17:11 +00:00 by claunia · 6 comments
Owner

Originally created by @zadjii-msft on GitHub (Dec 17, 2019).

Originally assigned to: @KaiyuWang16 on GitHub.

Repro Steps:

  1. Open the find dialog
  2. Type some text
  3. Press esc to dismiss the dialog
  4. type some characters

Actual behavior:

The first character typed after dismissing doesn't get sent to the TermControl

Expected

All the characters typed after dismissing the dialog should be sent to the TermControl/TerminalConnection

Originally created by @zadjii-msft on GitHub (Dec 17, 2019). Originally assigned to: @KaiyuWang16 on GitHub. ### Repro Steps: 1. Open the find dialog 2. Type some text 3. Press <kbd>esc</kbd> to dismiss the dialog 4. type some characters ### Actual behavior: The first character typed after dismissing doesn't get sent to the `TermControl` ### Expected All the characters typed after dismissing the dialog should be sent to the `TermControl`/`TerminalConnection`
Author
Owner

@KaiyuWang16 commented on GitHub (Dec 19, 2019):

Hi @zadjii-msft , I wonder if you can try again and repo this now ? Actually, I cannot repo this.

@KaiyuWang16 commented on GitHub (Dec 19, 2019): Hi @zadjii-msft , I wonder if you can try again and repo this now ? Actually, I cannot repo this.
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 19, 2019):

@KaiyuWang16 have you tried with both the keyboard and the mouse?

@DHowett-MSFT commented on GitHub (Dec 19, 2019): @KaiyuWang16 have you tried with both the keyboard _and_ the mouse?
Author
Owner

@KaiyuWang16 commented on GitHub (Dec 19, 2019):

@KaiyuWang16 have you tried with both the keyboard and the mouse?

Yes, I used "Esc" and mouse to close the search dialog.

@KaiyuWang16 commented on GitHub (Dec 19, 2019): > @KaiyuWang16 have you tried with both the keyboard and the mouse? Yes, I used "Esc" and mouse to close the search dialog.
Author
Owner

@zadjii-msft commented on GitHub (Dec 20, 2019):

Oh I see what's happening. It doesn't really repro in cmd, but it does fairly consistently in a bash shell. The reason is not that the search box is eating a char, but the Esc is getting turned into a literal Esc sent to the input, and bash treats this specially.

You can really see this "esc to the input" if you try the following in a cmd tab:

  1. Type a command, but don't enter it. Just leave it on the prompt line
  2. Open the find dialog
  3. Dismiss it with Esc

You'll see that the command you've typed is now gone, as if you hit Esc in cmd

@zadjii-msft commented on GitHub (Dec 20, 2019): Oh I see what's happening. It doesn't _really_ repro in `cmd`, but it does fairly consistently in a `bash` shell. The reason is not that the search box is eating a char, but the <kbd>Esc</kbd> is getting turned into a literal `Esc` sent to the input, and `bash` treats this specially. You can really see this "`esc` to the input" if you try the following in a `cmd` tab: 1. Type a command, but _don't_ enter it. Just leave it on the prompt line 2. Open the find dialog 3. Dismiss it with <kbd>Esc</kbd> You'll see that the command you've typed is now gone, as if you hit <kbd>Esc</kbd> in `cmd`
Author
Owner

@KaiyuWang16 commented on GitHub (Jan 2, 2020):

@zadjii-msft this PR should fix this issue: https://github.com/microsoft/terminal/pull/4028 I can not repro now.

@KaiyuWang16 commented on GitHub (Jan 2, 2020): @zadjii-msft this PR should fix this issue: https://github.com/microsoft/terminal/pull/4028 I can not repro now.
Author
Owner

@zadjii-msft commented on GitHub (Jan 2, 2020):

@DHowett-MSFT confirmed for me that #4028 fixed this as well 😄

@zadjii-msft commented on GitHub (Jan 2, 2020): @DHowett-MSFT confirmed for me that #4028 fixed this as well 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5602