diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 0ff4e7cf96..dd5ba0a867 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -853,12 +853,22 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1); } - if ((charW == VK_RETURN || charW == VK_ESCAPE) && es->hwndListBox) - { - if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0)) - SendMessageW(GetParent(hwnd), WM_KEYDOWN, charW, 0); - break; - } + if (es->hwndListBox) + { + if (charW == VK_RETURN || charW == VK_ESCAPE) + { + if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0)) + { + SendMessageW(GetParent(hwnd), WM_KEYDOWN, charW, 0); + break; + } + } + } + else + { + if (charW == VK_TAB || charW == VK_RETURN) + break; + } EDIT_WM_Char(es, charW); break; } diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 0d156410c8..74092beee5 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1296,9 +1296,9 @@ static void test_edit_dialog(void) r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 3); ok(444 == r, "Expected %d, got %d\n", 444, r); r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 4); - todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r); + ok(444 == r, "Expected %d, got %d\n", 444, r); r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 5); - todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r); + ok(444 == r, "Expected %d, got %d\n", 444, r); /* tests for WM_KEYDOWN + WM_CHAR */ r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 6); @@ -1306,7 +1306,7 @@ static void test_edit_dialog(void) r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 7); todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r); r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 8); - todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r); + ok(444 == r, "Expected %d, got %d\n", 444, r); } static BOOL RegisterWindowClasses (void)