mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
implement insertNewline: instead of intercepting its command. b=420750 r=masayuki sr=roc a=damon
This commit is contained in:
parent
afe04b3027
commit
611b54c343
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user