From 118dfb9690be3fd4ee278a0ef73e67d51d02c007 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 14 Feb 2018 09:34:32 -0800 Subject: [PATCH] hotkey: Document message_view_only with a comment. fixes #8323. --- static/js/hotkey.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/js/hotkey.js b/static/js/hotkey.js index 4a27416c12..44af0700c8 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -19,6 +19,13 @@ var actions_dropdown_hotkeys = [ // we'll do in cases where they have the exact same semantics. // DON'T FORGET: update keyboard_shortcuts.html +// The `message_view_only` property is a convenient and performant way +// to express a common case of which hotkeys do something in which +// views. It is set for hotkeys (like `*`) that only have an effect +// in the main message view with a selected message. +// `message_view_only` hotkeys, as a group, are not processed if any +// overlays are open (e.g. settings, streams, etc.). + var keydown_shift_mappings = { // these can be triggered by shift + key only 9: {name: 'shift_tab', message_view_only: false}, // tab