diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index de1b39813109128601cb46afc53a9dccc13bd540..164625fc955a0fc7e7f4602e241e5f60db1a5144 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -798,6 +798,12 @@ void LLFloaterIMSessionTab::onTearOffClicked()
 	{
 		forceReshape();
 	}
+	//Upon re-docking the torn off floater, select the corresponding conversation line item
+	else
+	{
+		LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
+		container->selectConversation(mSessionID);
+	}
 	refreshConversation();
 	updateGearBtn();
 }