diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index eec92c414c..86d6e450d4 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1987,9 +1987,16 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_TAB: if ( !(m_windowStyle & wxTE_PROCESS_TAB)) { - if (Navigate(!event.ShiftDown(), event.ControlDown())) - return; + Navigate(!event.ShiftDown(), event.ControlDown()); + return; } + else + { + // This is necessary (don't know why) or the tab will not + // be inserted. + WriteText(wxT("\t")); + } + break; } diff --git a/src/mac/classic/textctrl.cpp b/src/mac/classic/textctrl.cpp index 3819c0cd2e..18ebe8307f 100644 --- a/src/mac/classic/textctrl.cpp +++ b/src/mac/classic/textctrl.cpp @@ -1651,8 +1651,14 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_TAB: if ( !(m_windowStyle & wxTE_PROCESS_TAB)) { - if (Navigate(!event.ShiftDown(), event.ControlDown())) - return; + Navigate(!event.ShiftDown(), event.ControlDown()); + return; + } + else + { + // This is necessary (don't know why) or the tab will not + // be inserted. + WriteText(wxT("\t")); } break; }