activity: Clear search box after clicking a user in right sidebar.

Fixes #4105.
This commit is contained in:
Jonathan Pan 2017-03-18 09:45:09 -07:00 committed by Tim Abbott
parent a2689d6952
commit ceffe2128d

View File

@ -227,7 +227,7 @@ $(function () {
$('#user_presences').expectOne().on('click', '.selectable_sidebar_block', function (e) {
var user_id = $(e.target).parents('li').attr('data-user-id');
var email = people.get_person_from_user_id(user_id).email;
activity.escape_search();
narrow.by('pm-with', email, {select_first_unread: true, trigger: 'sidebar'});
// The preventDefault is necessary so that clicking the
// link doesn't jump us to the top of the page.