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; } }