Close the compose box on a stream sidbar narrow.

(imported from commit 6d7d80d29c4e7dc68807a7fcb9ce2d8573c1c3e0)
This commit is contained in:
Jessica McKellar
2013-09-24 12:17:10 -04:00
parent a99d2bebab
commit 4d730c1691

View File

@@ -1338,6 +1338,11 @@ $(function () {
if (exports.home_tab_obscured()) { if (exports.home_tab_obscured()) {
ui.change_tab_to('#home'); ui.change_tab_to('#home');
} }
// You are only narrowed to a stream, not a topic, so you are unlikely
// to immediately start composing, and if the compose box is open, you
// don't get to use hotkeys.
compose.cancel();
var stream = $(e.target).parents('li').attr('data-name'); var stream = $(e.target).parents('li').attr('data-name');
narrow.by('stream', stream, {select_first_unread: true, trigger: 'sidebar'}); narrow.by('stream', stream, {select_first_unread: true, trigger: 'sidebar'});