diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-31 18:37:15 -0700 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-01 16:55:24 -0700 |
commit | 3f2f4bda456a6e04aca6ab27983b337ddfdef3c5 (patch) | |
tree | adf2e82548fc2698aa303933670bf0b2a6c9f4bd | |
parent | 957331bf45e33c5d1ca0331ca6acb56fc8ecdb92 (diff) | |
download | gitlab-ce-3f2f4bda456a6e04aca6ab27983b337ddfdef3c5.tar.gz |
Remove delay when hitting Reply... button on page with a lot of discussions
-rw-r--r-- | app/assets/javascripts/gfm_auto_complete.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/gl_form.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js index 41f4c1914f2..2e5b15f4b77 100644 --- a/app/assets/javascripts/gfm_auto_complete.js +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -47,8 +47,8 @@ } } }, - setup: function(wrap) { - this.input = $('.js-gfm-input'); + setup: function(input) { + this.input = input || $('.js-gfm-input'); this.destroyAtWho(); this.setupAtWho(); if (this.dataSource) { diff --git a/app/assets/javascripts/gl_form.js b/app/assets/javascripts/gl_form.js index 6ac7564a848..528a673eb15 100644 --- a/app/assets/javascripts/gl_form.js +++ b/app/assets/javascripts/gl_form.js @@ -21,7 +21,7 @@ this.form.find('.div-dropzone').remove(); this.form.addClass('gfm-form'); disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button')); - GitLab.GfmAutoComplete.setup(); + GitLab.GfmAutoComplete.setup(this.form.find('.js-gfm-input')); new DropzoneInput(this.form); autosize(this.textarea); this.addEventListeners(); |