From d888bcd47398abcf96f68681d8f0d1e0f4b67d97 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 17 Jun 2015 20:10:19 +0200 Subject: [PATCH] deadkey backspace safari fix --- AppKit/CPTextView/CPTextView.j | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 540745fb7..36061b515 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -2134,9 +2134,16 @@ var _CPCopyPlaceholder = '-'; { // filter out the shift-up, cursor keys and friends used to access the deadkeys // fixme: e.which is depreciated(?) -> find a better way to identify the modifier-keyups - if (e.which != 8 && e.which < 27 || e.which == 91 || e.which == 93) // include apple command keys + if (e.which != 8 && e.which != 13 && e.which < 27 || e.which == 91 || e.which == 93) // include apple command keys return; + if(_CPNativeInputFieldActive && _CPNativeInputField.innerHTML.slice(-1) == ">") // exit when safari starts inserting tags + { + _CPNativeInputField.innerHTML='' + [self cancelCurrentNativeInputSession]; + return; + } + _CPNativeInputFieldKeyUpCalled = YES; var currentFirstResponder = [[CPApp mainWindow] firstResponder]