X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d55f45e94a243fef267d466f249fbb18835ecdc..b7d3a622aa58729f92941c2b6710c5481b16f19e:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 582e3a1bd1..3cf85ba094 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1810,6 +1810,14 @@ void wxTextCtrl::OnKeyDown(wxKeyEvent& event) } } + // Default window procedure of multiline edit controls posts WM_CLOSE to + // the parent window when it gets Escape key press for some reason, prevent + // it from doing this as this resulted in dialog boxes being closed on + // Escape even when they shouldn't be (we do handle Escape ourselves + // correctly in the situations when it should close them). + if ( event.GetKeyCode() == WXK_ESCAPE && IsMultiLine() ) + return; + // no, we didn't process it event.Skip(); }