Skip to content

Commit

Permalink
Let windows with wxWANTS_CHARS have TAB presses under Mac
Browse files Browse the repository at this point in the history
This notably fixes the use of TAB in wxStyledTextCtrl, where it's
supposed to be handled by the control itself and not as a navigation
key, but is more general than this.

Fixes a regression from 8bca6de.

Closes wxWidgets#17999.
  • Loading branch information
vadz committed Feb 18, 2018
1 parent a4487c0 commit cad824d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/osx/cocoa/window.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3552,8 +3552,9 @@ new wxCocoaGesturesImpl(this, m_osxView, eventsMask)

bool wxWidgetCocoaImpl::ShouldHandleKeyNavigation(const wxKeyEvent &WXUNUSED(event)) const
{
// Only controls that intercept tabs for different behavior should return false (ie wxTE_PROCESS_TAB)
return true;
// If the window wants to have all keys, let it have it and don't process
// TAB as key navigation event.
return !m_wxPeer->HasFlag(wxWANTS_CHARS);
}

bool wxWidgetCocoaImpl::DoHandleKeyNavigation(const wxKeyEvent &event)
Expand Down

0 comments on commit cad824d

Please sign in to comment.