mirror of https://github.com/zulip/zulip.git
Fix that you have to save an edited message twice to complete the edit.
(imported from commit 87226d857845c6f16cb3bc0d6ab5bb748aca5987)
This commit is contained in:
parent
a6a3110bfb
commit
f4b99c8177
|
@ -14,11 +14,8 @@ exports.save = function (row) {
|
|||
if (new_content !== message.raw_content) {
|
||||
request.content = new_content;
|
||||
}
|
||||
if (request.subject === undefined &&
|
||||
request.content === undefined) {
|
||||
// If they didn't change anything, just cancel it.
|
||||
return message_edit.cancel(row);
|
||||
}
|
||||
if ((request.subject !== undefined) ||
|
||||
(request.content !== undefined)) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/json/update_message',
|
||||
|
@ -30,6 +27,8 @@ exports.save = function (row) {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
message_edit.cancel(row);
|
||||
// The message will automatically get replaced when it arrives.
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue