diff --git a/AppKit/CPMenu/CPMenu.j b/AppKit/CPMenu/CPMenu.j index a0fbb3785..962307a66 100644 --- a/AppKit/CPMenu/CPMenu.j +++ b/AppKit/CPMenu/CPMenu.j @@ -1075,6 +1075,7 @@ var _CPMenuBarVisible = NO, if (self === [CPApp mainMenu]) [self _flashItemAtIndex:index]; + anEvent._isKeyEquivalent = YES; // prevent the menu keystroke from beeing inserted into textview [self performActionForItemAtIndex:index]; } else diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 1baff4b49..6c186de21 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -1867,7 +1867,7 @@ Sets the selection to a range of characters in response to user action. } else { - [_typingAttributes setObject:[sender selectedFont] forKey:CPFontAttributeName]; + [_typingAttributes setObject:[sender convertFont:oldFont] forKey:CPFontAttributeName]; } } else @@ -2754,12 +2754,14 @@ var _CPCopyPlaceholder = '-'; var currentFirstResponder = [[CPApp keyWindow] firstResponder]; if (currentFirstResponder && [currentFirstResponder respondsToSelector:@selector(insertText:)]) - // setTimeout to prevent flickering - setTimeout(function(){ - [currentFirstResponder insertText:textToInsert] - }, 20); + var event = [CPApp currentEvent]; - // CRUCIAL: Clear the field immediately after grabbing its content. + if (!event._isKeyEquivalent) + setTimeout(function(){ + [currentFirstResponder insertText:textToInsert] + }, 20); + + // Clear the field immediately after grabbing its content. _CPNativeInputField.innerHTML = ''; };