summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbijeet <abijeetpatro@gmail.com>2018-01-19 00:44:58 +0530
committerAbijeet <abijeetpatro@gmail.com>2018-03-27 00:49:34 +0530
commitfacd1cae2f34d1833563cffe9e6f1361896a80d7 (patch)
tree4a7be680fe8723bbd9f835a93fa427df8ea0c85f
parent8cdbb1ccd89fe056aabf4e91c9c08160be5dddeb (diff)
downloadnextcloud-server-facd1cae2f34d1833563cffe9e6f1361896a80d7.tar.gz
nextcloud-server-facd1cae2f34d1833563cffe9e6f1361896a80d7.zip
Fixes issue where saving a non-modified comment kept the edit window open.
Now irrespective of the whether the comment has been modified we are going to go back to the view mode. Signed-off-by: Abijeet <abijeetpatro@gmail.com>
-rw-r--r--apps/comments/js/commentstabview.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 20f1f590a28..dec2b6545d5 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -668,6 +668,12 @@
}, {
success: function(model) {
self._onSubmitSuccess(model, $form);
+ if(model.get('message').trim() === model.previous('message').trim()) {
+ // model change event doesn't trigger, manually remove the row.
+ var $row = $form.closest('.comment');
+ $row.data('commentEl').removeClass('hidden');
+ $row.remove();
+ }
},
error: function() {
self._onSubmitError($form, commentId);