Fix Plugin Admin close issue after typing ENTER

Prevent closing the PA-dlg by ENTER in search editctrl.

Ref:
https://support.microsoft.com/en-us/topic/how-to-use-the-enter-key-from-edit-controls-in-a-dialog-box-a520c533-1a62-f51c-af93-c7f978bc1080

Fixes: #11348, close #11351
This commit is contained in:
xomx 2022-03-07 12:09:45 +01:00 committed by Don Ho
parent f6ea35d521
commit 4593293b4d
1 changed files with 6 additions and 2 deletions

View File

@ -1140,8 +1140,12 @@ intptr_t CALLBACK PluginsAdminDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
switch (wParam)
{
case IDCANCEL :
case IDOK :
case IDOK:
if (::GetFocus() == ::GetDlgItem(_hSelf, IDC_PLUGINADM_SEARCH_EDIT))
::PostMessage(_hSelf, WM_NEXTDLGCTL, 0, 0L);
return TRUE;
case IDCANCEL:
display(false);
return TRUE;