mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Update + hotkey to use the keypress mechanism.
This fixes in issue where the new + hotkey only worked if you hit shift+=, not if you pressed an actual "+" key on the keyboard. Fixes #4182.
This commit is contained in:
@@ -196,6 +196,7 @@ function stubbing(func_name_to_stub, test_function) {
|
||||
|
||||
assert_mapping('@', 'compose.reply_with_mention');
|
||||
assert_mapping('*', 'message_flags.toggle_starred');
|
||||
assert_mapping('+', 'reactions.toggle_reaction');
|
||||
assert_mapping('r', 'compose.respond_to_message');
|
||||
assert_mapping('R', 'compose.respond_to_message', true);
|
||||
assert_mapping('j', 'navigate.down');
|
||||
@@ -272,7 +273,6 @@ function stubbing(func_name_to_stub, test_function) {
|
||||
assert_mapping('page_down', 'navigate.page_down');
|
||||
assert_mapping('spacebar', 'navigate.page_down');
|
||||
assert_mapping('up_arrow', 'navigate.up');
|
||||
assert_mapping('+', 'reactions.toggle_reaction', true, false);
|
||||
|
||||
hotkey.is_lightbox_open = return_true;
|
||||
assert_mapping('left_arrow', 'lightbox.prev');
|
||||
|
||||
@@ -49,7 +49,6 @@ var keydown_shift_mappings = {
|
||||
// these can be triggered by shift + key only
|
||||
9: {name: 'shift_tab', message_view_only: false}, // tab
|
||||
32: {name: 'shift_spacebar', message_view_only: true}, // space bar
|
||||
187: {name: 'thumbs_up_emoji', message_view_only: true}, // '+'
|
||||
};
|
||||
|
||||
var keydown_unshift_mappings = {
|
||||
@@ -89,6 +88,7 @@ var keydown_either_mappings = {
|
||||
|
||||
var keypress_mappings = {
|
||||
42: {name: 'star_message', message_view_only: true}, // '*'
|
||||
43: {name: 'thumbs_up_emoji', message_view_only: true}, // '+'
|
||||
47: {name: 'search', message_view_only: false}, // '/'
|
||||
58: {name: 'open_reactions', message_view_only: true}, // ':'
|
||||
63: {name: 'show_shortcuts', message_view_only: false}, // '?'
|
||||
|
||||
Reference in New Issue
Block a user