fix intermittant errors in merge_commit_message_toggle_spec.rb

This commit is contained in:
Mike Greiling 2017-02-02 12:55:01 -06:00
parent 4615d09951
commit 42086615e5

View file

@ -110,9 +110,8 @@
};
MergeRequest.prototype.initCommitMessageListeners = function() {
var textarea = $('textarea.js-commit-message');
$('a.js-with-description-link').on('click', function(e) {
$(document).on('click', 'a.js-with-description-link', function(e) {
var textarea = $('textarea.js-commit-message');
e.preventDefault();
textarea.val(textarea.data('messageWithDescription'));
@ -120,7 +119,8 @@
$('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();
textarea.val(textarea.data('messageWithoutDescription'));