summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/search_results_item.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index 7804cab7b..0c25e23bc 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -1,6 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
+import $ from 'jquery';
import UserProfile from './user_profile.jsx';
import UserStore from 'stores/user_store.jsx';
@@ -23,6 +24,10 @@ export default class SearchResultsItem extends React.Component {
this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this);
}
+ hideSidebar() {
+ $('.inner-wrap, .sidebar--right').removeClass('move--left');
+ }
+
handleFocusRHSClick(e) {
e.preventDefault();
GlobalActions.emitPostFocusRightHandSideFromSearch(this.props.post, this.props.isMentionSearch);
@@ -127,6 +132,8 @@ export default class SearchResultsItem extends React.Component {
type: ActionTypes.RECEIVED_POST_SELECTED,
postId: null
});
+
+ this.hideSidebar();
}
browserHistory.push('/' + window.location.pathname.split('/')[1] + '/pl/' + post.id);
}