Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2435,6 +2435,16 @@ protected virtual void OnDropDown(EventArgs e)
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnKeyDown(KeyEventArgs e)
{
// for fix https://github.com/dotnet/winforms/issues/12941
char input = (char)e.KeyValue;
if ((AutoCompleteMode == AutoCompleteMode.Suggest || AutoCompleteMode == AutoCompleteMode.SuggestAppend) &&
!char.IsControl(input))
{
DroppedDown = false;
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik Feb 21, 2025

Choose a reason for hiding this comment

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

This change in behavior might not work for some users. For example, if the autocomplete list is not displayed because what the user types is not in the drop-down list, we shouldn't close the drop down. I would rather not fix it.

Copy link
Member

Choose a reason for hiding this comment

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

I'm going to have to agree here. I don't like that change in behavior.

Copy link
Member Author

@Epica3055 Epica3055 Feb 24, 2025

Choose a reason for hiding this comment

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

ok I will close this PR, maybe someday I will pick it up 🤣

}

// End fix

// Do Return/ESC handling
if (SystemAutoCompleteEnabled)
{
Expand Down