mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-11 11:07:07 +00:00
make safari fix more robust
This commit is contained in:
1 parent
fef8f4d29c
commit
1b7f684ab2
1 file changed
+3
-7
@@ -2153,13 +2153,6 @@ var _CPCopyPlaceholder = '-';
|
||||
if (e.which == 8) // safari backspace fix
|
||||
_CPNativeInputFieldKeyPressedCalled = YES;
|
||||
|
||||
if(_CPNativeInputFieldActive && _CPNativeInputField.innerHTML.slice(-1) == ">") // exit when safari starts inserting tags
|
||||
{
|
||||
_CPNativeInputField.innerHTML=''
|
||||
[self cancelCurrentNativeInputSession];
|
||||
return;
|
||||
}
|
||||
|
||||
_CPNativeInputFieldKeyUpCalled = YES;
|
||||
var currentFirstResponder = [[CPApp mainWindow] firstResponder];
|
||||
|
||||
@@ -2181,6 +2174,9 @@ var _CPCopyPlaceholder = '-';
|
||||
[currentFirstResponder _activateNativeInputElement:_CPNativeInputField];
|
||||
} else
|
||||
{
|
||||
if (_CPNativeInputField.innerHTML.length > 1)
|
||||
_CPNativeInputField.innerHTML = '';
|
||||
|
||||
if (_CPNativeInputFieldActive)
|
||||
[self _endInputSessionWithString:_CPNativeInputField.innerHTML];
|
||||
|
||||
|
||||
Reference in new issue
Block a user