зеркало из https://github.com/mozilla/pjs.git
workaround for blocker bug 8123. approved by chofmann.
This commit is contained in:
Родитель
835a8e5d69
Коммит
bc55cc6026
|
@ -205,9 +205,15 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||
// we handle these two special characters here because it makes windows integration
|
||||
// eaiser
|
||||
//
|
||||
|
||||
PRBool ctrlKey;
|
||||
PRBool altKey;
|
||||
uiEvent->GetCtrlKey(&ctrlKey);
|
||||
uiEvent->GetAltKey(&altKey);
|
||||
|
||||
if (NS_SUCCEEDED(uiEvent->GetKeyCode(&keyCode)))
|
||||
{
|
||||
if (nsIDOMUIEvent::VK_BACK==keyCode) {
|
||||
if (nsIDOMUIEvent::VK_BACK==keyCode) {
|
||||
mEditor->DeleteSelection(nsIEditor::eDeleteLeft);
|
||||
return NS_ERROR_BASE; // consumed
|
||||
}
|
||||
|
@ -217,7 +223,8 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(uiEvent->GetCharCode(&character)))
|
||||
if ((PR_FALSE==altKey) && (PR_FALSE==ctrlKey) &&
|
||||
(NS_SUCCEEDED(uiEvent->GetCharCode(&character))))
|
||||
{
|
||||
key += character;
|
||||
mEditor->InsertText(key);
|
||||
|
|
|
@ -205,9 +205,15 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||
// we handle these two special characters here because it makes windows integration
|
||||
// eaiser
|
||||
//
|
||||
|
||||
PRBool ctrlKey;
|
||||
PRBool altKey;
|
||||
uiEvent->GetCtrlKey(&ctrlKey);
|
||||
uiEvent->GetAltKey(&altKey);
|
||||
|
||||
if (NS_SUCCEEDED(uiEvent->GetKeyCode(&keyCode)))
|
||||
{
|
||||
if (nsIDOMUIEvent::VK_BACK==keyCode) {
|
||||
if (nsIDOMUIEvent::VK_BACK==keyCode) {
|
||||
mEditor->DeleteSelection(nsIEditor::eDeleteLeft);
|
||||
return NS_ERROR_BASE; // consumed
|
||||
}
|
||||
|
@ -217,7 +223,8 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(uiEvent->GetCharCode(&character)))
|
||||
if ((PR_FALSE==altKey) && (PR_FALSE==ctrlKey) &&
|
||||
(NS_SUCCEEDED(uiEvent->GetCharCode(&character))))
|
||||
{
|
||||
key += character;
|
||||
mEditor->InsertText(key);
|
||||
|
|
Загрузка…
Ссылка в новой задаче