diff --git a/editor/base/nsEditorEventListeners.cpp b/editor/base/nsEditorEventListeners.cpp index e55cbfb7f6a7..aa768086bffd 100644 --- a/editor/base/nsEditorEventListeners.cpp +++ b/editor/base/nsEditorEventListeners.cpp @@ -185,6 +185,10 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent) // so look for special keys using keyCode if (0 != keyCode) { + if (nsIDOMUIEvent::DOM_VK_SHIFT==keyCode + || nsIDOMUIEvent::DOM_VK_CONTROL==keyCode + || nsIDOMUIEvent::DOM_VK_ALT==keyCode) + return NS_ERROR_BASE; // consumed if (nsIDOMUIEvent::DOM_VK_BACK==keyCode) { mEditor->DeleteSelection(nsIEditor::eDeletePrevious); diff --git a/editor/libeditor/text/nsEditorEventListeners.cpp b/editor/libeditor/text/nsEditorEventListeners.cpp index e55cbfb7f6a7..aa768086bffd 100644 --- a/editor/libeditor/text/nsEditorEventListeners.cpp +++ b/editor/libeditor/text/nsEditorEventListeners.cpp @@ -185,6 +185,10 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent) // so look for special keys using keyCode if (0 != keyCode) { + if (nsIDOMUIEvent::DOM_VK_SHIFT==keyCode + || nsIDOMUIEvent::DOM_VK_CONTROL==keyCode + || nsIDOMUIEvent::DOM_VK_ALT==keyCode) + return NS_ERROR_BASE; // consumed if (nsIDOMUIEvent::DOM_VK_BACK==keyCode) { mEditor->DeleteSelection(nsIEditor::eDeletePrevious);