From b64daa1f8427dc85ea5345e3abcaaa4df9e4df2b Mon Sep 17 00:00:00 2001 From: dmitry Date: Mon, 17 Sep 2018 22:43:37 +0000 Subject: [PATCH] cocoa: removing tabControl workaround git-svn-id: trunk@59058 - --- lcl/interfaces/cocoa/cocoatabcontrols.pas | 25 ----------------------- 1 file changed, 25 deletions(-) diff --git a/lcl/interfaces/cocoa/cocoatabcontrols.pas b/lcl/interfaces/cocoa/cocoatabcontrols.pas index 07ba977d3c..6fea6878c1 100644 --- a/lcl/interfaces/cocoa/cocoatabcontrols.pas +++ b/lcl/interfaces/cocoa/cocoatabcontrols.pas @@ -110,7 +110,6 @@ type tabView: TCocoaTabControl; tabPage: TCocoaTabPage; procedure setFrame(arect: NSRect); override; - function nextResponder: NSResponder; override; end; function IndexOfTab(ahost: TCocoaTabControl; atab: NSTabViewItem): Integer; @@ -320,30 +319,6 @@ begin inherited setFrame(arect); end; -function TCocoaTabPageView.nextResponder: NSResponder; -begin - // by default nextResponder would return the parrent. - // for TCocoaTabPageView this would be NSTabView (TCocoaTabControl) - // (or NSView*, that would eventually return NSTabView) - // - // When processing keyboard events, and processing Control-Left or Control-Right - // Window finds a NSTabView amongn "the chain of responders", it would - // execute moveLeft: or moveRight: methods of that NSTabView, - // instead of delivering Control-Left to the firstResponder. - // Thus affecting any focused control that depends on Ctrl+Left, Ctrl+Right - // (namely TSynEdit). - // - // So the solution is to prevent NSTabView be available in "chain of responders" - // - // Test: Create a form -> place TTabControl on it with 1 page -> put SynEdit on it - // See if TSynEdit can process Ctrl+Left, Ctrl+Right - // - // * NSView would be returned if TCocoaTabPageView is added as a child - // for a view of a tab, instead of being assigned as a view of a tab - if Assigned(tabView) then Result := tabView.nextResponder - else Result:=inherited nextResponder; -end; - { TCocoaTabPage } function TCocoaTabPage.lclGetCallback: ICommonCallback;