Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bigelow <sbigelow@gitlab.com>2019-06-11 23:40:57 +0300
committerSam Bigelow <sbigelow@gitlab.com>2019-06-12 22:36:02 +0300
commiteb719b9fed14665babf2704cf21701571f5c5c6a (patch)
treeb4ba1281b1cfd316501731148c3fd319cd7851ba /app/assets/javascripts
parent9bf141cf718ab9ca770c3bd6b7e2c6719cbe9da7 (diff)
Allow command and control click to work on MR tabs
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);
}
}
}