From d835cf0c000364ec5435e7074ddce7ebb2d816fa Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 23 Jun 2025 07:32:49 +0200 Subject: [PATCH] fixed: CPViewController doesn't participate fully in responder chain --- AppKit/CPViewController.j | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AppKit/CPViewController.j b/AppKit/CPViewController.j index beb6d4b02..b2cde5f47 100644 --- a/AppKit/CPViewController.j +++ b/AppKit/CPViewController.j @@ -414,6 +414,20 @@ var CPViewControllerCachedCibs; [self didChangeValueForKey:"isViewLoaded"]; } +/*! + @method nextResponder + Returns the receiver’s next responder. + + @discussion The CPViewController implementation of this method returns the superview + of the view controller's view. This effectively inserts the view controller + into the responder chain between its view and the view's superview, + assuming the view's next responder has been set to the view controller. +*/ +- (id)nextResponder +{ + return [_view superview]; +} + - (BOOL)automaticallyNotifiesObserversOfIsViewLoaded { return NO;