Commit 356368d9 authored by Mike Greiling's avatar Mike Greiling

fix failing rspec build

parent 5e1243b0
...@@ -110,9 +110,8 @@ require('./merge_request_tabs'); ...@@ -110,9 +110,8 @@ require('./merge_request_tabs');
}; };
MergeRequest.prototype.initCommitMessageListeners = function() { MergeRequest.prototype.initCommitMessageListeners = function() {
var textarea = $('textarea.js-commit-message'); $(document).on('click', 'a.js-with-description-link', function(e) {
var textarea = $('textarea.js-commit-message');
$('a.js-with-description-link').on('click', function(e) {
e.preventDefault(); e.preventDefault();
textarea.val(textarea.data('messageWithDescription')); textarea.val(textarea.data('messageWithDescription'));
...@@ -120,7 +119,8 @@ require('./merge_request_tabs'); ...@@ -120,7 +119,8 @@ require('./merge_request_tabs');
$('p.js-without-description-hint').show(); $('p.js-without-description-hint').show();
}); });
$('a.js-without-description-link').on('click', function(e) { $(document).on('click', 'a.js-without-description-link', function(e) {
var textarea = $('textarea.js-commit-message');
e.preventDefault(); e.preventDefault();
textarea.val(textarea.data('messageWithoutDescription')); textarea.val(textarea.data('messageWithoutDescription'));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment