mirror of https://github.com/zulip/zulip.git
messages_overlay: Fix multiple IDs selected accidentally.
Since `success_message_scheduled_banner` and scheduled message overlay both use `data-scheduled-message-id`, `get_element_by_id` needs to be more specific which selector it wants.
This commit is contained in:
parent
e8349aa5d7
commit
93f0581197
|
@ -181,5 +181,7 @@ function scroll_to_element($element: JQuery, context: Context): void {
|
|||
}
|
||||
|
||||
function get_element_by_id(id: number | string, context: Context): JQuery {
|
||||
return $(`[${CSS.escape(context.id_attribute_name)}='${CSS.escape(id.toString())}']`);
|
||||
return $(
|
||||
`.overlay-message-row[${CSS.escape(context.id_attribute_name)}='${CSS.escape(id.toString())}']`,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue