hotkey.js: Add reactions popover navigation.

Fixes #4197.
This commit is contained in:
Joshua Pan 2017-04-19 05:37:03 +00:00 committed by Tim Abbott
parent a7327422a8
commit 4fb450d4a9
2 changed files with 9 additions and 0 deletions

View File

@ -17,6 +17,10 @@ set_global('activity', {
set_global('drafts', {
});
set_global('reactions', {
reaction_navigate: function () { return; },
});
set_global('$', function () {
return {
// Hack: Used for reactions hotkeys; may want to restructure.
@ -155,6 +159,7 @@ function stubbing(func_name_to_stub, test_function) {
set_global('popovers', {
actions_popped: return_false,
reactions_popped: return_false,
});
// All letters should return false if we are composing text.

View File

@ -453,6 +453,10 @@ exports.process_hotkey = function (e, hotkey) {
return false;
}
if (popovers.reactions_popped()) {
return reactions.reaction_navigate(e, event_name);
}
if (hotkey.message_view_only && ui_state.home_tab_obscured()) {
return false;
}