diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index cb489627fbe7c1d62885b09e561e80b40577f5d6..1ca3545aae7761dd30b86d8c61caedc55444c6f2 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -391,6 +391,12 @@ BOOL LLIMFloater::postBuild()
 	}
 }
 
+void LLIMFloater::onTearOffClicked(LLIMFloater* self)
+{
+	onClickTearOff(self);
+	updateTitleButtons();
+}
+
 void LLIMFloater::boundVoiceChannel()
 {
 	LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
@@ -1377,6 +1383,7 @@ void LLIMFloater::updateTitleButtons()
 	}
 
 	bool is_hosted = getHost() != NULL;
+
 	if (is_hosted) ///< floater is hosted
 	{
 		for (S32 i = 0; i < BUTTON_COUNT; i++)
@@ -1391,6 +1398,7 @@ void LLIMFloater::updateTitleButtons()
 		}
 
 		mExpandCollapseBtn->setImageOverlay(getString("collapse_icon"));
+
 	}
 	else ///< floater is torn off
 	{
@@ -1403,6 +1411,8 @@ void LLIMFloater::updateTitleButtons()
 		}
 	}
 
+	getChild<LLButton>("close_btn")->setVisible(is_hosted);
+
 	LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID);
 	if (session)
 	{
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 60b392952f369a53816be8097d2d912a6c9f7ad2..03f52fb31600905f1cdba36adff17181aecda3c4 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -93,6 +93,7 @@ class LLIMFloater
 
 	// called when docked floater's position has been set by chiclet
 	void setPositioned(bool b) { mPositioned = b; };
+
 	void onVisibilityChange(const LLSD& new_visibility);
 
 	// Implements LLVoiceClientStatusObserver::onChange() to enable the call
@@ -139,6 +140,8 @@ class LLIMFloater
 	/* virtual */ void onFocusLost();
 	/* virtual */ void onFocusReceived();
 
+	void onTearOffClicked(LLIMFloater *self);
+
 	// Update the window title, input field help text, etc.
 	void updateSessionName(const std::string& ui_title, const std::string& ui_label);