diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 50d7074d4b77429b1f046f74ffc5998cc6e2f38e..f9e29c0a92c82923087d293d3c394d533ad231b3 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -61,6 +61,8 @@ class LLPanelOutfitsInventory : public LLPanel
 
 	void openApearanceTab(const std::string& tab_name);
 
+    bool isCOFPanelActive() const;
+
 protected:
 	void updateVerbs();
 
@@ -73,7 +75,6 @@ class LLPanelOutfitsInventory : public LLPanel
 protected:
 	void 					initTabPanels();
 	void 					onTabChange();
-	bool 					isCOFPanelActive() const;
 	bool 					isOutfitsListPanelActive() const;
 	bool 					isOutfitsGalleryPanelActive() const;
 
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index aed9dba7ef825a427721f36b00db3f90e3e45112..7571d361a42a299c903cd464a38d871bc95b4235 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -361,6 +361,15 @@ void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string
     }
 }
 
+bool LLSidepanelAppearance::isCOFPanelVisible()
+{
+    if (mPanelOutfitsInventory && mPanelOutfitsInventory->getVisible())
+    {
+        return mPanelOutfitsInventory->isCOFPanelActive();
+    }
+    return false;
+}
+
 void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)
 {
 	if (!mOutfitEdit || mOutfitEdit->getVisible() == visible)
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index bb9709a2b84c89c385def7e54d47bae059ed0f2b..e67652d6f706f4ebe104a76922652b0383d8388d 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -66,6 +66,8 @@ class LLSidepanelAppearance : public LLPanel
 	void updateToVisibility( const LLSD& new_visibility );
 	LLPanelEditWearable* getWearable(){ return mEditWearable; }
 
+    bool isCOFPanelVisible();
+
 private:
 	void onFilterEdit(const std::string& search_string);
 	void onVisibilityChanged ( const LLSD& new_visibility );
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 553eaaf9b2afc34d0baf6f997b4572a24cd5038b..0e3527ec36ad176941b3c4ba7eeefece694796c3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -102,6 +102,7 @@
 #include "llsceneview.h"
 #include "llscenemonitor.h"
 #include "llselectmgr.h"
+#include "llsidepanelappearance.h"
 #include "llspellcheckmenuhandler.h"
 #include "llstatusbar.h"
 #include "lltextureview.h"
@@ -6651,6 +6652,13 @@ void handle_edit_outfit()
 
 void handle_now_wearing()
 {
+    LLSidepanelAppearance *panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLFloaterSidePanelContainer::getPanel("appearance"));
+    if (panel_appearance && panel_appearance->isInVisibleChain() && panel_appearance->isCOFPanelVisible())
+    {
+        LLFloaterReg::findInstance("appearance")->closeFloater();
+        return;
+    }
+
     LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "now_wearing"));
 }