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:
Shubham Dhama
2018-03-05 13:40:05 +05:30
committed by Tim Abbott
parent 5ee6c608c0
commit 3fb862533f
2 changed files with 8 additions and 8 deletions

View File

@@ -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) {