mirror of https://github.com/zulip/zulip.git
upload: Fix upload under message edit mode when edited using hotkeys.
This refactors the attachment of jQuery-filedrop handler into `message_edit.start_edit_with_content`.
This commit is contained in:
parent
5ee6c608c0
commit
3fb862533f
|
@ -200,15 +200,8 @@ $(function () {
|
|||
|
||||
$('body').on('click', '.edit_content_button', function (e) {
|
||||
var row = current_msg_list.get_row(rows.id($(this).closest(".message_row")));
|
||||
var row_id = rows.id(row);
|
||||
current_msg_list.select_id(row_id);
|
||||
current_msg_list.select_id(rows.id(row));
|
||||
message_edit.start(row);
|
||||
$('#message_edit_content_' + row_id).closest('#message_edit_form').filedrop(
|
||||
upload.options({
|
||||
mode: 'edit',
|
||||
row: row_id,
|
||||
})
|
||||
);
|
||||
e.stopPropagation();
|
||||
popovers.hide_all();
|
||||
});
|
||||
|
|
|
@ -327,6 +327,13 @@ function start_edit_with_content(row, content, edit_box_open_callback) {
|
|||
if (edit_box_open_callback) {
|
||||
edit_box_open_callback();
|
||||
}
|
||||
|
||||
row.find('#message_edit_form').filedrop(
|
||||
upload.options({
|
||||
mode: 'edit',
|
||||
row: rows.id(row),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
exports.start = function (row, edit_box_open_callback) {
|
||||
|
|
Loading…
Reference in New Issue