diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 92df28130734887db18a268f5372b48dd7943298..60a37ac4af96f923a6b3067ff72980b72542d2b8 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -252,11 +252,33 @@ void LLNearbyChatToastPanel::onMouseEnter				(S32 x, S32 y, MASK mask)
 }
 
 BOOL	LLNearbyChatToastPanel::handleMouseDown	(S32 x, S32 y, MASK mask)
+{
+	return LLPanel::handleMouseDown(x,y,mask);
+}
+
+BOOL	LLNearbyChatToastPanel::handleMouseUp	(S32 x, S32 y, MASK mask)
 {
 	if(mSourceType != CHAT_SOURCE_AGENT)
-		return LLPanel::handleMouseDown(x,y,mask);
+		return LLPanel::handleMouseUp(x,y,mask);
+
+	LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false);
+	S32 local_x = x - text_box->getRect().mLeft;
+	S32 local_y = y - text_box->getRect().mBottom;
+	
+	//if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat.
+	if (text_box->pointInView(local_x, local_y) )
+	{
+		if (text_box->handleMouseUp(local_x,local_y,mask) == TRUE)
+			return TRUE;
+		else
+		{
+			LLFloaterReg::showInstance("nearby_chat",LLSD());
+			return FALSE;
+		}
+	}
+
 	LLFloaterReg::showInstance("nearby_chat",LLSD());
-	return LLPanel::handleMouseDown(x,y,mask);
+	return LLPanel::handleMouseUp(x,y,mask);
 }
 
 void	LLNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e)
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index 0a85c524015f32cc513474f90762024b385a673f..f4b86550541fc96fd6baa07e581ba37179b2cad2 100644
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -68,6 +68,7 @@ class LLNearbyChatToastPanel: public LLToastPanelBase
 	void	onMouseLeave	(S32 x, S32 y, MASK mask);
 	void	onMouseEnter	(S32 x, S32 y, MASK mask);
 	BOOL	handleMouseDown	(S32 x, S32 y, MASK mask);
+	BOOL	handleMouseUp	(S32 x, S32 y, MASK mask);
 
 	virtual BOOL postBuild();