diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index a1cae4bb988fe24a57ec30c1d2c43fd2a6789ccc..4fd62045e8b841e9aa8f6c4f9f244f43c77b8455 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())
 		{