summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-09-07 20:17:00 +0000
committerFatih Acet <acetfatih@gmail.com>2016-09-07 20:17:00 +0000
commit13a91b560e74b457eab20fe2c48e0af5afcf41b3 (patch)
tree52eb8883dcaded0c24fa27628491dcfa8362a196 /app
parent723ea7078dc151cec38b08292da9b68a9536f619 (diff)
parente7b0334cfb13d42c20f704cd02eafc0f97c9d7ed (diff)
downloadgitlab-ce-13a91b560e74b457eab20fe2c48e0af5afcf41b3.tar.gz
Merge branch 'fix-textarea-expansion' into 'master'
Add textarea autoresize after comment ## What does this MR do? Adds an autoresize after a comment is posted ## Are there points in the code the reviewer needs to double check? Shouldn't be ## Why was this MR needed? To keep the UI consistent (the same as if you were to refresh it) ## Screenshots (if relevant) Before: ![IyCczzXfaf](/uploads/2229bad47e3f3821f1efaa6868a52025/IyCczzXfaf.gif) After: ![E6O0kRBrJq](/uploads/4aec6b436ff172ba281c2c2a4481906d/E6O0kRBrJq.gif) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21667 See merge request !6152
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notes.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index d0d5cad813a..ebe9ff2b8c4 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -331,7 +331,12 @@
form.find(".js-md-write-button").click();
form.find(".js-note-text").val("").trigger("input");
form.find(".js-note-text").data("autosave").reset();
- return this.updateTargetButtons(e);
+
+ var event = document.createEvent('Event');
+ event.initEvent('autosize:update', true, false);
+ form.find('.js-autosize')[0].dispatchEvent(event);
+
+ this.updateTargetButtons(e);
};
Notes.prototype.reenableTargetFormSubmitButton = function() {