summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorSam Bigelow <sbigelow@gitlab.com>2019-06-11 16:40:57 -0400
committerSam Bigelow <sbigelow@gitlab.com>2019-06-12 15:36:02 -0400
commiteb719b9fed14665babf2704cf21701571f5c5c6a (patch)
treeb4ba1281b1cfd316501731148c3fd319cd7851ba /app/assets/javascripts
parent9bf141cf718ab9ca770c3bd6b7e2c6719cbe9da7 (diff)
downloadgitlab-ce-eb719b9fed14665babf2704cf21701571f5c5c6a.tar.gz
Allow command and control click to work on MR tabs57813-merge-request-tabs-do-not-handle-ctrl-click-correctly
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js
index e5cf43e8289..b6868e63716 100644
--- a/app/assets/javascripts/merge_request_tabs.js
+++ b/app/assets/javascripts/merge_request_tabs.js
@@ -147,14 +147,14 @@ export default class MergeRequestTabs {
e.stopImmediatePropagation();
e.preventDefault();
- const { action } = e.currentTarget.dataset;
+ const { action } = e.currentTarget.dataset || {};
- if (action) {
- const href = e.currentTarget.getAttribute('href');
- this.tabShown(action, href);
- } else if (isMetaClick(e)) {
+ if (isMetaClick(e)) {
const targetLink = e.currentTarget.getAttribute('href');
window.open(targetLink, '_blank');
+ } else if (action) {
+ const href = e.currentTarget.getAttribute('href');
+ this.tabShown(action, href);
}
}
}