From a840cd88ab93bbef7bfd94275966f652f6ce0b4a Mon Sep 17 00:00:00 2001 From: Joelute Date: Sun, 23 Apr 2023 16:36:53 -0400 Subject: [PATCH] click_handlers: Allow messages being edited/viewed to be clicked. If a user is editing a message or viewing the message source, they'll notice that clicking on the messsage doesn't move the blue box to it while the keyboard works just fine. We want to allow the message to be selected while not triggering the reply function. --- web/src/click_handlers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/click_handlers.js b/web/src/click_handlers.js index e3d49ec55c..d288aa781a 100644 --- a/web/src/click_handlers.js +++ b/web/src/click_handlers.js @@ -177,13 +177,13 @@ export function initialize() { const $row = $(this).closest(".message_row"); const id = rows.id($row); + message_lists.current.select_id(id); + if (message_edit.is_editing(id)) { // Clicks on a message being edited shouldn't trigger a reply. return; } - message_lists.current.select_id(id); - if (page_params.is_spectator) { return; }