mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
compose: Use class to find markdown_preview related elements.
We convert the following elements to use a class instead of id for accessing them across the codebase: * markdown_preview * undo_markdown_preview * markdown_preview_spinner * message_edit_content * preview_content Converted them together since changes to one impacted the other in some modules like click_handlers. Also, added a function in rows to get `message_row`.
This commit is contained in:
@@ -686,7 +686,9 @@ export function register_click_handlers() {
|
||||
// The following check will return false if emoji was not selected in
|
||||
// message edit form.
|
||||
if (edit_message_id !== null) {
|
||||
const edit_message_textarea = $(`#message_edit_content_${CSS.escape(edit_message_id)}`);
|
||||
const edit_message_textarea = $(
|
||||
`#edit_form_${CSS.escape(edit_message_id)} .message_edit_content`,
|
||||
);
|
||||
// Assign null to edit_message_id so that the selection of emoji in new
|
||||
// message composition form works correctly.
|
||||
edit_message_id = null;
|
||||
|
||||
Reference in New Issue
Block a user