From e64ed9fc9015518f4ec04d7bde9f2155b4bf2ffe Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Mon, 30 Apr 2001 23:58:55 +0000 Subject: [PATCH] Fixed context menu problem when > 1 cell selected, b=55991, r=akkana, sr=kin git-svn-id: svn://10.0.0.236/trunk@93494 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditorShellMouseListener.cpp | 4 ++++ mozilla/editor/composer/src/nsEditorShellMouseListener.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mozilla/editor/base/nsEditorShellMouseListener.cpp b/mozilla/editor/base/nsEditorShellMouseListener.cpp index 19fe35f1bda..c4f78de623a 100644 --- a/mozilla/editor/base/nsEditorShellMouseListener.cpp +++ b/mozilla/editor/base/nsEditorShellMouseListener.cpp @@ -273,6 +273,10 @@ nsEditorShellMouseListener::MouseDown(nsIDOMEvent* aMouseEvent) continue;//dont bail yet, iterate through them all res = nsrange->IsPointInRange(parent, offset, &NodeIsInSelection); + + // Done when we find a range that we are in + if (NodeIsInSelection) + break; } } diff --git a/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp b/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp index 19fe35f1bda..c4f78de623a 100644 --- a/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp +++ b/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp @@ -273,6 +273,10 @@ nsEditorShellMouseListener::MouseDown(nsIDOMEvent* aMouseEvent) continue;//dont bail yet, iterate through them all res = nsrange->IsPointInRange(parent, offset, &NodeIsInSelection); + + // Done when we find a range that we are in + if (NodeIsInSelection) + break; } }