mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
upload: Support drag and dropping files anywhere on message viewport.
While Zulip has supported drag/drop into the compose box for some time, if you drag/drop the file onto other parts of the message viewport, it would just do the default browswer behavior of replacing the Zulip app with that file opened in a new tab, which nobody wants. The inline comments document the set of rules for how we choose whether to drop the upload into the compose box or an edit widget, and also how to open the compose box in different situations. Fixes #14579.
This commit is contained in:
committed by
Tim Abbott
parent
1b9fb037a1
commit
4e7bf3c4fb
@@ -742,6 +742,10 @@ export function end_inline_topic_edit($row) {
|
||||
message_lists.current.hide_edit_topic_on_recipient_row($row);
|
||||
}
|
||||
|
||||
export function get_upload_object_from_row(row_id) {
|
||||
return upload_objects_by_row.get(row_id);
|
||||
}
|
||||
|
||||
function remove_uploads_from_row(row_id) {
|
||||
const uploads_for_row = upload_objects_by_row.get(row_id);
|
||||
// We need to cancel all uploads, reset their progress,
|
||||
|
||||
Reference in New Issue
Block a user