mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
upload: Return single elem for get_item(drag_drop_container) w/ edit.
Previously, opening multiple message_edits and then drag-dropping a
file into any one of them would cause all of them to upload ie you'd
get one uploaded file in each message_edit.
This bug was caused by returning multiple elements from
upload.get_item("drag_drop_container", config) when config.mode =
"edit".
This commit changes the selector to use the row provided (config.row),
and so ensures that the above bug doesn't happen.
This commit is contained in:
@@ -77,7 +77,7 @@ export function get_item(key, config) {
|
||||
case "source":
|
||||
return "message-edit-file-input";
|
||||
case "drag_drop_container":
|
||||
return $(".message_edit_form");
|
||||
return $(`#zfilt${CSS.escape(config.row)} .message_edit_form`);
|
||||
case "markdown_preview_hide_button":
|
||||
return $(`#edit_form_${CSS.escape(config.row)} .undo_markdown_preview`);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user