From be442b6221406fae96b2c3a74f1214e058b28e1d Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Tue, 3 Nov 2015 12:37:41 -0500
Subject: Changed TeamSettingsModal click handlers to not affect other modals

---
 web/react/components/team_settings_modal.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'web/react/components/team_settings_modal.jsx')

diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx
index 17fe31c65..4d47db2a8 100644
--- a/web/react/components/team_settings_modal.jsx
+++ b/web/react/components/team_settings_modal.jsx
@@ -17,11 +17,13 @@ export default class TeamSettingsModal extends React.Component {
         };
     }
     componentDidMount() {
-        $('body').on('click', '.modal-back', function handleBackClick() {
+        const modal = $(ReactDOM.findDOMNode(this.refs.modal));
+
+        modal.on('click', '.modal-back', function handleBackClick() {
             $(this).closest('.modal-dialog').removeClass('display--content');
             $(this).closest('.modal-dialog').find('.settings-table .nav li.active').removeClass('active');
         });
-        $('body').on('click', '.modal-header .close', () => {
+        modal.on('click', '.modal-header .close', () => {
             setTimeout(() => {
                 $('.modal-dialog.display--content').removeClass('display--content');
             }, 500);
-- 
cgit v1.2.3-1-g7c22

