Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message: Avoid toggling user card on selecting user name.

apoorvapendse40b2eb2e0aa2
diff --git a/web/src/user_card_popover.ts b/web/src/user_card_popover.ts
index ac88241cb55..48353fc71dd 100644
--- a/web/src/user_card_popover.ts
+++ b/web/src/user_card_popover.ts
@@ -25,6 +25,7 @@ import {$t, $t_html} from "./i18n.ts";
import * as message_lists from "./message_lists.ts";
import {user_can_send_direct_message} from "./message_util.ts";
import * as message_view from "./message_view.ts";
+import * as mouse_drag from "./mouse_drag.ts";
import * as muted_users from "./muted_users.ts";
import * as overlays from "./overlays.ts";
import {page_params} from "./page_params.ts";
@@ -676,8 +677,11 @@ function register_click_handlers(): void {
"click",
".sender_name, .inline-profile-picture-wrapper",
function (this: HTMLElement, e) {
- const $row = $(this).closest(".message_row");
e.stopPropagation();
+ if (mouse_drag.is_drag(e)) {
+ return;
+ }
+ const $row = $(this).closest(".message_row");
assert(message_lists.current !== undefined);
const message = message_lists.current.get(rows.id($row));
assert(message !== undefined);