From 880a4f20815d8a35dff5bc2aceb95b5f9ffcef4c Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Wed, 22 Mar 2000 01:30:16 +0000 Subject: [PATCH] r=jfrancis. small change to stop the editor from scrolling window when it DOESNT handle a key event --- editor/base/nsEditorEventListeners.cpp | 4 ++-- editor/libeditor/text/nsEditorEventListeners.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/base/nsEditorEventListeners.cpp b/editor/base/nsEditorEventListeners.cpp index 03c98c0a4a93..ac522c717a9c 100644 --- a/editor/base/nsEditorEventListeners.cpp +++ b/editor/base/nsEditorEventListeners.cpp @@ -223,8 +223,8 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent) } } - htmlEditor->EditorKeyPress(keyEvent); - ScrollSelectionIntoView(); + if (NS_SUCCEEDED(htmlEditor->EditorKeyPress(keyEvent))) + ScrollSelectionIntoView(); } else ScrollSelectionIntoView(); diff --git a/editor/libeditor/text/nsEditorEventListeners.cpp b/editor/libeditor/text/nsEditorEventListeners.cpp index 03c98c0a4a93..ac522c717a9c 100644 --- a/editor/libeditor/text/nsEditorEventListeners.cpp +++ b/editor/libeditor/text/nsEditorEventListeners.cpp @@ -223,8 +223,8 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent) } } - htmlEditor->EditorKeyPress(keyEvent); - ScrollSelectionIntoView(); + if (NS_SUCCEEDED(htmlEditor->EditorKeyPress(keyEvent))) + ScrollSelectionIntoView(); } else ScrollSelectionIntoView();