upload: Do not open compose box when editing.

Previously editing a message and uploading a file in
the edit textarea opened the message compose box.

Fixes #15890.
This commit is contained in:
Gittenburg
2020-07-23 10:20:10 +02:00
committed by Tim Abbott
parent 77234ef40b
commit f4e02f0e80

View File

@@ -228,7 +228,7 @@ exports.setup_upload = function (config) {
} }
const split_uri = uri.split("/"); const split_uri = uri.split("/");
const filename = split_uri[split_uri.length - 1]; const filename = split_uri[split_uri.length - 1];
if (!compose_state.composing()) { if (config.mode === "compose" && !compose_state.composing()) {
compose_actions.start("stream"); compose_actions.start("stream");
} }
const absolute_uri = exports.make_upload_absolute(uri); const absolute_uri = exports.make_upload_absolute(uri);