workaround for blocker bug 8123. approved by chofmann.

This commit is contained in:
buster%netscape.com 1999-07-08 19:52:44 +00:00
Родитель 835a8e5d69
Коммит bc55cc6026
2 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -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);