From fb3da5c5bd370ce32bee2f840ace4b8e5001d5a2 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Fri, 24 Sep 2010 14:07:48 +0200 Subject: [PATCH] don't handle key events directly in CPScrollView In stead CPScrollView will just pass the keyDown: event up the responder chain. If the event reaches the window, the window will send the correct action back to the first responder, if no responder before CPScrollView in the chain handles the event, CPScrollView will. --- AppKit/CPScrollView.j | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index 9b04aaebe..36d4e145c 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -963,18 +963,13 @@ [enclosingScrollView _respondToScrollWheelEventWithDeltaX:extraX deltaY:extraY]; } -- (void)keyDown:(CPEvent)anEvent -{ - [self interpretKeyEvents:[anEvent]]; -} - -- (void)pageUp:(id)sender +- (void)scrollPageUp:(id)sender { var contentBounds = [_contentView bounds]; [self moveByOffset:CGSizeMake(0.0, -(_CGRectGetHeight(contentBounds) - _verticalPageScroll))]; } -- (void)pageDown:(id)sender +- (void)scrollPageDown:(id)sender { var contentBounds = [_contentView bounds]; [self moveByOffset:CGSizeMake(0.0, _CGRectGetHeight(contentBounds) - _verticalPageScroll)];