提交 42086615 编写于 作者: M Mike Greiling

fix intermittant errors in merge_commit_message_toggle_spec.rb

上级 4615d099
...@@ -110,9 +110,8 @@ ...@@ -110,9 +110,8 @@
}; };
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 @@ ...@@ -120,7 +119,8 @@
$('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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册