mirror of https://github.com/zulip/zulip.git
user_group_popover: Show popover on group mention in drafts overlay.
Fixes #31102. It would be good to have defined the event listener in `user_group_popover.js` to keep everything in one place, but since direct event handlers were getting invoked before delegated event handlers, we had to define direct event handlers in the launch function of drafts overlay ui.
This commit is contained in:
parent
29809ea61b
commit
620970c46d
|
@ -14,6 +14,7 @@ import * as people from "./people";
|
|||
import * as rendered_markdown from "./rendered_markdown";
|
||||
import * as stream_data from "./stream_data";
|
||||
import * as user_card_popover from "./user_card_popover";
|
||||
import * as user_group_popover from "./user_group_popover";
|
||||
|
||||
function restore_draft(draft_id) {
|
||||
const draft = drafts.draft_model.getDraft(draft_id);
|
||||
|
@ -197,6 +198,11 @@ export function launch() {
|
|||
user_card_popover.unsaved_message_user_mention_event_handler(e);
|
||||
});
|
||||
|
||||
$("#drafts_table .restore-overlay-message").on("click", ".user-group-mention", (e) => {
|
||||
user_group_popover.toggle_user_group_info_popover(e.currentTarget, undefined);
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$("#drafts_table .overlay_message_controls .delete-overlay-message").on(
|
||||
"click",
|
||||
function () {
|
||||
|
|
Loading…
Reference in New Issue