diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 3315d5b18d80984d6e9dc86607238a5d1c16e266..9b7df38c5ef565e8fb5cd04a04f225111321e43b 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -352,9 +352,6 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
 
 	LLIMFloater* floater = LLFloaterReg::showTypedInstance<LLIMFloater>("impanel", session_id);
 
-	floater->updateMessages();
-	floater->mInputEditor->setFocus(TRUE);
-
 	if(isChatMultiTab())
 	{
 		// do not add existed floaters to avoid adding torn off instances
@@ -434,6 +431,13 @@ void LLIMFloater::setVisible(BOOL visible)
 	{
 		channel->updateShowToastsState();
 	}
+
+	if (visible && mChatHistory && mInputEditor)
+	{
+		//only if floater was construced and initialized from xml
+		updateMessages();
+		mInputEditor->setFocus(TRUE);
+	}
 }
 
 //static