Tab should toggle stream/huddle even if you clicked the compose botton.

(imported from commit a705c7cd0d6067dc05da7a64f29fb3ef42838785)
This commit is contained in:
Tim Abbott 2012-10-17 12:05:43 -04:00
parent d2343813df
commit 8a7779ad49
3 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@ var globals =
// hotkey.js
+ ' process_goto_hotkey process_compose_hotkey process_key_in_input'
+ ' set_compose_hotkey'
// narrow.js
+ ' narrow_target_message_id narrowed show_all_messages'

View File

@ -23,6 +23,7 @@ function compose_button(tabname) {
clear_compose_box();
$('#sidebar a[href="#home"]').tab('show');
show_compose(tabname, $("#" + tabname));
set_compose_hotkey();
}
function toggle_compose() {

View File

@ -142,6 +142,10 @@ function process_compose_hotkey(code) {
return process_hotkey(code);
}
function set_compose_hotkey() {
keydown_handler = process_compose_hotkey;
}
$(document).keydown(function (e) {
pressed_keys[e.which] = true;
});