From 5f49061661a401980aa89195995bfb165b33ff12 Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Fri, 16 Apr 2010 13:31:06 +0300
Subject: [PATCH] Fixed normal bug EXT-6806 (Context menu conflict: selected
 text vs group) - prefer text menu if it has selection. Reviewed by Vadim
 Savchuk at https://codereview.productengine.com/secondlife/r/245/.

--HG--
branch : product-engine
---
 indra/llui/lltexteditor.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index a1cae4bb988..4fd62045e8b 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -713,7 +713,8 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
 	{
 		setFocus(TRUE);
 	}
-	if (!LLTextBase::handleRightMouseDown(x, y, mask))
+	// Prefer editor menu if it has selection. See EXT-6806.
+	if (hasSelection() || !LLTextBase::handleRightMouseDown(x, y, mask))
 	{
 		if(getShowContextMenu())
 		{
-- 
GitLab