diff options
author | Phil Hughes <me@iamphill.com> | 2017-01-22 11:39:51 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-01-22 11:39:57 +0000 |
commit | 1b3b4f4e340210b12666230f34ede0d8dca1ae87 (patch) | |
tree | 301f65d215d51c21fa0f9169615a1c16adf04eda | |
parent | 125abfd4b2c72dd2b1b81cef259cb1004a8db800 (diff) | |
download | gitlab-ce-1b3b4f4e340210b12666230f34ede0d8dca1ae87.tar.gz |
Fixed bug with merge immediately button would not work
This was caused by using 'this' in a fat arrow function, so 'this' would not equal the jQuery element
-rw-r--r-- | app/assets/javascripts/merge_request_widget/ci_bundle.js.es6 | 2 | ||||
-rw-r--r-- | changelogs/unreleased/merge-dropdown-this-context.yml | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6 b/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6 index 9c4a7eabcb6..5969d2ba56b 100644 --- a/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6 +++ b/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6 @@ -30,7 +30,7 @@ .off('click', '.js-merge-dropdown a') .on('click', '.js-merge-dropdown a', (e) => { e.preventDefault(); - $(this).closest('form').submit(); + $(e.target).closest('form').submit(); }); if ($('.rebase-in-progress').length) { merge_request_widget.rebaseInProgress(); diff --git a/changelogs/unreleased/merge-dropdown-this-context.yml b/changelogs/unreleased/merge-dropdown-this-context.yml new file mode 100644 index 00000000000..5c4890fcaa2 --- /dev/null +++ b/changelogs/unreleased/merge-dropdown-this-context.yml @@ -0,0 +1,4 @@ +--- +title: Fixed bug where links in merge dropdown wouldn't work +merge_request: +author: |