hotkey: Fix incorrect preventDefault for recent_topics hotkeys.

This logic correctly prevents the hotkeys implemented below it from
being active when "Recent topics" is open.  We expect to change some
parts of that soon (see #17685), but in any case, we should always
return false in the hotkey code when we don't process a key, so that
default browser behavior works.

This fixes browser shortcuts like Ctrl+C, Ctrl+V, etc. when recent
topics is loaded.

This bug was introduced in 1eafb1d8b3.

Thanks to ganpa3 for noticing this bug.
This commit is contained in:
Tim Abbott
2021-04-04 17:53:34 -07:00
committed by Tim Abbott
parent e86b2c8d58
commit 4462df64da

View File

@@ -756,7 +756,7 @@ export function process_hotkey(e, hotkey) {
// open. These involve compose box hotkeys and hotkeys that can only
// be done performed on a message.
if (recent_topics.is_visible()) {
return true;
return false;
}
// Compose box hotkeys