diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 6260b6ab1..07fddaf17 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -1053,7 +1053,7 @@ Sets the selection to a range of characters in response to user action. [[_window platformWindow] _propagateCurrentDOMEvent:YES]; // for the _CPNativeInputManager (necessary at least on FF and chrome) - if (![_CPNativeInputManager isNativeInputFieldActive] && [event charactersIgnoringModifiers].charCodeAt(0) != 229) // filter out 229 because this would be inserted in chrome on each deadkey + if (![_CPNativeInputManager isNativeInputFieldActive] && ![_CPNativeInputManager isDeadKey:event]) [self interpretKeyEvents:[event]]; [_caret setPermanentlyVisible:YES]; @@ -2638,7 +2638,14 @@ var _CPCopyPlaceholder = '-'; { return _CPNativeInputFieldActive; } ++ (void)isDeadKey:(CPEvent)event +{ +#if PLATFORM(DOM) + return event._DOMEvent && (event._DOMEvent.key == 'Dead' || event._DOMEvent.key == 'Process'); +#endif + return NO; +} + (void)cancelCurrentNativeInputSession { @@ -2713,14 +2720,6 @@ var _CPCopyPlaceholder = '-'; var charCode = _CPNativeInputField.innerHTML.charCodeAt(0); - // å and Å need to be filtered out in keyDown: due to chrome inserting 229 on a deadkey - if (charCode == 229 || charCode == 197) - { - [currentFirstResponder insertText:_CPNativeInputField.innerHTML]; - _CPNativeInputField.innerHTML = ''; - return; - } - // chrome-trigger: keypressed is omitted for deadkeys if (!_CPNativeInputFieldActive && _CPNativeInputFieldKeyPressedCalled == NO && _CPNativeInputField.innerHTML.length && _CPNativeInputField.innerHTML != _CPCopyPlaceholder && _CPNativeInputField.innerHTML.length < 3) {