summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-09-11 14:13:16 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2017-10-19 11:48:30 -0400
commitd0630ed38d9b7afa9f7099016507756ea5e77edf (patch)
tree446d60581de169c5b7c4299c5db27dc317e9a22b
parent490cce630f5984d063283537ac42a6f9fbad86e6 (diff)
downloadgitlab-ce-d0630ed38d9b7afa9f7099016507756ea5e77edf.tar.gz
notes.js: also return the original content when getting form data
-rw-r--r--app/assets/javascripts/notes.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 9c008da1a5d..0e70999326a 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -1280,10 +1280,12 @@ export default class Notes {
* Get data from Form attributes to use for saving/submitting comment.
*/
getFormData($form) {
+ const content = $form.find('.js-note-text').val();
return {
formData: $form.serialize(),
- formContent: _.escape($form.find('.js-note-text').val()),
+ formContent: _.escape(content),
formAction: $form.attr('action'),
+ formContentOriginal: content,
};
}