diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 5873df516907e4eda6513fe0a108de6a1486d8de..6816137e523c46820c2bea5e48239e113d74d648 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -3258,6 +3258,11 @@ bool LLFloater::isShown() const
     return ! isMinimized() && isInVisibleChain();
 }
 
+bool LLFloater::isDetachedAndNotMinimized()
+{
+	return !getHost() && !isMinimized();
+}
+
 /* static */
 bool LLFloater::isShown(const LLFloater* floater)
 {
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 4dba1e645f5bdcf3d6319180c24efa89879c8170..26ac4a98adc9b36a43e8f0f78552e56e61962bc2 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -238,6 +238,7 @@ class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
 	void			center();
 
 	LLMultiFloater* getHost();
+	bool isDetachedAndNotMinimized();
 
 	void			applyTitle();
 	std::string		getCurrentTitle() const;
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 094d50207866598e2b87208fd65a09003f026beb..e0ab70bac7113aae1531ec986929ce7cf02ce3ef 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -45,6 +45,7 @@
 #include "llenvmanager.h"
 #include "llfirstuse.h"
 #include "llfloatercamera.h"
+#include "llfloaterimcontainer.h"
 #include "llfloaterreg.h"
 #include "llfloatertools.h"
 #include "llgroupactions.h"
@@ -90,6 +91,7 @@
 #include "llworld.h"
 #include "llworldmap.h"
 #include "stringize.h"
+#include "boost/foreach.hpp"
 
 using namespace LLVOAvatarDefines;
 
@@ -2002,7 +2004,16 @@ void LLAgent::endAnimationUpdateUI()
 			{
 				skip_list.insert(LLFloaterReg::findInstance("mini_map"));
 			}
-		
+
+			LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+			LLFloaterIMContainer::floater_list_t conversations;
+			im_box->getDetachedConversationFloaters(conversations);
+			BOOST_FOREACH(LLFloater* conversation, conversations)
+			{
+				llinfos << "skip_list.insert(session_floater): " << conversation->getTitle() << llendl;
+				skip_list.insert(conversation);
+			}
+
 			gFloaterView->popVisibleAll(skip_list);
 #endif
 			mViewsPushed = FALSE;
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index b6c53e5e30f6dae92d95857597dd2826003850d9..911e14bcd53084d80e65d3e4f86e6fa3e5f7471c 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -340,16 +340,20 @@ void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
 {
 	// Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
 	// Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
-	LLFolderViewModelItem* item = mViewModelItem;
-	LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
-	LLFloater* session_floater = LLFloaterIMSessionTab::getConversation(session_uuid);
-	
-	if (session_floater && !session_floater->getHost() && !session_floater->isMinimized())
+	LLFloater* session_floater = getSessionFloater();
+	if (session_floater && session_floater->isDetachedAndNotMinimized())
 	{
 		session_floater->setVisible(visible);
 	}
 }
 
+LLFloater* LLConversationViewSession::getSessionFloater()
+{
+	LLFolderViewModelItem* item = mViewModelItem;
+	LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
+	return LLFloaterIMSessionTab::getConversation(session_uuid);
+}
+
 LLConversationViewParticipant* LLConversationViewSession::findParticipant(const LLUUID& participant_id)
 {
 	// This is *not* a general tree parsing algorithm. We search only in the mItems list
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 3eb2e63792d00e8fe5bf9d977488ea5818f347d9..7e432804d03d7f9a01c6cd15ba7dd6204a5178e7 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -87,6 +87,8 @@ class LLConversationViewSession : public LLFolderViewFolder
 
 	/*virtual*/ void setFlashState(bool flash_state);
 
+	LLFloater* getSessionFloater();
+
 private:
 
 	void onCurrentVoiceSessionChanged(const LLUUID& session_id);
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index f89e818928fd8c7828bc7f480bbba03c535f41c3..8575f6f0558510ae13eac7eb3c923163d1856f3f 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -54,6 +54,7 @@
 #include "llworld.h"
 #include "llsdserialize.h"
 #include "llviewerobjectlist.h"
+#include "boost/foreach.hpp"
 
 //
 // LLFloaterIMContainer
@@ -660,6 +661,23 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
 	LLMultiFloater::setVisible(visible);
 }
 
+void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& floaters)
+{
+	typedef conversations_widgets_map::value_type conv_pair;
+	BOOST_FOREACH(conv_pair item, mConversationsWidgets)
+	{
+		LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(item.second);
+		if (widget)
+		{
+			LLFloater* session_floater = widget->getSessionFloater();
+			if (session_floater && session_floater->isDetachedAndNotMinimized())
+			{
+				floaters.push_back(session_floater);
+			}
+		}
+	}
+}
+
 void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
 {
 	LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index f6c716e2cfb1f3ad27e9eeba603d8f6a0d6235b5..5ea1a38c635532ab9498deacae1ace7a79bf9598 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -194,6 +194,8 @@ class LLFloaterIMContainer
 	bool isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget);
 	boost::signals2::connection mMicroChangedSignal;
 	S32 getConversationListItemSize() { return mConversationsWidgets.size(); }
+	typedef std::list<LLFloater*> floater_list_t;
+	void getDetachedConversationFloaters(floater_list_t& floaters);
 
 private:
 	LLConversationViewSession* createConversationItemWidget(LLConversationItem* item);