diff --git a/src/richtext/richtextstyledlg.cpp b/src/richtext/richtextstyledlg.cpp index 060e0981d9..75e821a694 100644 --- a/src/richtext/richtextstyledlg.cpp +++ b/src/richtext/richtextstyledlg.cpp @@ -349,6 +349,9 @@ void wxRichTextStyleOrganiserDialog::CreateControls() } else { + // Avoid the Escape key logic falling back on OK after finding + // a hidden wxID_CANCEL contol + m_closeButton->SetId(wxID_HIGHEST); m_buttonSizer->Show(m_closeButton, false); }