From 22aa2c8c07075f603a1408b7185c01b49d92fc7f Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaad@spinpunch.com>
Date: Mon, 15 Feb 2016 20:25:28 +0500
Subject: Fixing custom theme header click event

---
 web/react/components/user_settings/custom_theme_chooser.jsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'web/react/components/user_settings/custom_theme_chooser.jsx')

diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx
index 242615bc0..1e724bb6e 100644
--- a/web/react/components/user_settings/custom_theme_chooser.jsx
+++ b/web/react/components/user_settings/custom_theme_chooser.jsx
@@ -156,8 +156,13 @@ class CustomThemeChooser extends React.Component {
     }
     toggleContent(e) {
         e.stopPropagation();
-        $(e.target).next().slideToggle();
-        $(e.target).toggleClass('open');
+        if ($(e.target).hasClass('theme-elements__header')) {
+            $(e.target).next().slideToggle();
+            $(e.target).toggleClass('open');
+        } else {
+            $(e.target).closest('.theme-elements__header').next().slideToggle();
+            $(e.target).closest('.theme-elements__header').toggleClass('open');
+        }
     }
     render() {
         const {formatMessage} = this.props.intl;
-- 
cgit v1.2.3-1-g7c22

