diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-01-05 00:44:00 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-01-05 00:44:00 +0300 |
commit | 36412ee2c23015927fd7980df4997ec46c0b81c3 (patch) | |
tree | 3af0188d36a2dfe587b5ba83fe70e677f0c14dfb /app/assets/javascripts | |
parent | e3d92a6cb4ee9cfa2e5283a3b9d2d91be3a232fa (diff) | |
download | gitlab-ce-36412ee2c23015927fd7980df4997ec46c0b81c3.tar.gz |
Fix review comments.single-edit-comment-widget-2
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index 54f2e7ad7d7..31a71379af3 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -128,7 +128,7 @@ return e.metaKey || e.ctrlKey || e.altKey || e.shiftKey; }; - gl.utils.animateToElement = function($el) { + gl.utils.scrollToElement = function($el) { var top = $el.offset().top; gl.navBarHeight = gl.navBarHeight || $('.navbar-gitlab').height(); gl.navLinksHeight = gl.navLinksHeight || $('.nav-links').height(); diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 8cdc623c83b..8de5a6191b6 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -500,7 +500,7 @@ var isWidgetVisible = gl.utils.isInViewport($el.get(0)); if (!isWidgetVisible) { - gl.utils.animateToElement($el); + gl.utils.scrollToElement($el); } $el.find('.js-edit-warning').show(); @@ -563,7 +563,6 @@ $editForm.insertBefore('.notes-form'); $editForm.find('.js-comment-button').enable(); $editForm.find('.js-edit-warning').hide(); - $editForm.find('.js-md-write-button').trigger('click'); }; Notes.prototype.getEditFormSelector = function($el) { @@ -900,6 +899,8 @@ $editForm.find('.js-form-target-id').val(targetId); $editForm.find('.js-form-target-type').val(targetType); $editForm.find('.js-note-text').focus().val(originalContent); + $editForm.find('.js-md-write-button').trigger('click'); + $editForm.find('.referenced-users').hide(); } Notes.prototype.updateTaskList = function(e) { |