diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 0dd63c26326e8086d4a7d4e6e4e457354518a60c..91527c68f2de88a0ab6d1609ecc57600a20b73ca 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1556,18 +1556,6 @@ BOOL LLTabContainer::setTab(S32 which)
 	return is_visible;
 }
 
-
-void LLTabContainer::hideAllTabs()
-{
-
-	setCurrentPanelIndex(0);
-	for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
-	{
-		(* iter)->mTabPanel->setVisible(FALSE);
-	}
-}
-
-
 BOOL LLTabContainer::selectTabByName(const std::string& name)
 {
 	LLPanel* panel = getPanelByName(name);
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index a9cdf22b16169b89da623c6e984b32bcd4032433..57862fc626c0374c49a863a238836b0d4963553e 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -192,7 +192,7 @@ class LLTabContainer : public LLPanel
 	BOOL 		selectTabPanel( LLPanel* child );
 	BOOL 		selectTab(S32 which);
 	BOOL 		selectTabByName(const std::string& title);
-	void        hideAllTabs();
+    void        setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; }
 
 	BOOL        getTabPanelFlashing(LLPanel* child);
 	void		setTabPanelFlashing(LLPanel* child, BOOL state);
@@ -243,8 +243,6 @@ class LLTabContainer : public LLPanel
 
 	void setTabsHidden(BOOL hidden)		{ mTabsHidden = hidden; }
 	BOOL getTabsHidden() const			{ return mTabsHidden; }
-	
-	void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; }
 
 	void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap
 	void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index a5b93f36926123f4182a706b9ff3708946238cbd..23c21d5309a41c54448ae82ccf0fc92f5cbe1c71 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -516,13 +516,32 @@ void LLFloaterIMContainer::tabClose()
 	}
 }
 
+//Shows/hides the stub panel when a conversation floater is torn off
 void LLFloaterIMContainer::showStub(bool stub_is_visible)
 {
-	if (stub_is_visible)
-	{
-		mTabContainer->hideAllTabs();
-	}
+    S32 tabCount = 0;
+    LLPanel * tabPanel = NULL;
+
+    if(stub_is_visible)
+    {
+        tabCount = mTabContainer->getTabCount();
+
+        //Hide all tabs even stub
+        for(S32 i = 0; i < tabCount; ++i)
+        {
+            tabPanel = mTabContainer->getPanelByIndex(i);
+
+            if(tabPanel)
+            {
+                tabPanel->setVisible(false);
+            }
+        }
+
+        //Set the index to the stub panel since we will be showing the stub
+        mTabContainer->setCurrentPanelIndex(0);
+    }
 
+    //Now show/hide the stub
 	mStubPanel->setVisible(stub_is_visible);
 }