From 611b54c34374bd67c9f2c2744dbb514a4cb0e619 Mon Sep 17 00:00:00 2001 From: "joshmoz@gmail.com" Date: Tue, 4 Mar 2008 14:32:55 -0800 Subject: [PATCH] implement insertNewline: instead of intercepting its command. b=420750 r=masayuki sr=roc a=damon --- widget/src/cocoa/nsChildView.mm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/widget/src/cocoa/nsChildView.mm b/widget/src/cocoa/nsChildView.mm index 4f237d1fd10a..6f98b5a9ffb1 100644 --- a/widget/src/cocoa/nsChildView.mm +++ b/widget/src/cocoa/nsChildView.mm @@ -4030,25 +4030,20 @@ static PRBool IsSpecialGeckoKey(UInt32 macKeyCode) - (void)insertNewline:(id)sender { - // dummy impl, does nothing other than stop the beeping when hitting return + [self insertText:@"\n"]; } - (void) doCommandBySelector:(SEL)aSelector { NS_OBJC_BEGIN_TRY_ABORT_BLOCK; + #if DEBUG_IME NSLog(@"**** in doCommandBySelector %s (ignore %d)", aSelector, mIgnoreDoCommand); #endif - if (mIgnoreDoCommand) - return; - if (aSelector == @selector(insertNewline:)) { - [self insertText:@"\n"]; - return; - } - - [super doCommandBySelector:aSelector]; + if (!mIgnoreDoCommand) + [super doCommandBySelector:aSelector]; NS_OBJC_END_TRY_ABORT_BLOCK; }