diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-29 12:13:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-29 12:13:28 +0300 |
commit | dc90e040b1da4c089e90b21809a325d67ab2c5cb (patch) | |
tree | c894e6d6e008562db76151beb771a8c3ae3260ca /app/assets/javascripts/issue.js | |
parent | 6a4f265c940d3d0a9aeacf09222920d7d2cc4e45 (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'app/assets/javascripts/issue.js')
-rw-r--r-- | app/assets/javascripts/issue.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js index 29bb6eff1b2..4b53225e100 100644 --- a/app/assets/javascripts/issue.js +++ b/app/assets/javascripts/issue.js @@ -89,9 +89,10 @@ export default class Issue { initIssueBtnEventListeners() { const issueFailMessage = __('Unable to update this issue at this time.'); - return $(document).on( + // NOTE: data attribute seems unnecessary but is actually necessary + return $('.js-issuable-buttons[data-action="close-reopen"]').on( 'click', - '.js-issuable-actions a.btn-close, .js-issuable-actions a.btn-reopen, a.btn-close-anyway', + 'a.btn-close, a.btn-reopen, a.btn-close-anyway', e => { e.preventDefault(); e.stopImmediatePropagation(); @@ -108,10 +109,7 @@ export default class Issue { } else { this.disableCloseReopenButton($button); - const url = $button.data('close-reopen-url'); - if (!url) { - return; - } + const url = $button.attr('href'); return axios .put(url) |