diff options
Diffstat (limited to 'app/assets/javascripts/boards/components/board_card.vue')
-rw-r--r-- | app/assets/javascripts/boards/components/board_card.vue | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue index 5735c8ded3d..246d3b9dcd1 100644 --- a/app/assets/javascripts/boards/components/board_card.vue +++ b/app/assets/javascripts/boards/components/board_card.vue @@ -2,6 +2,7 @@ /* eslint-disable vue/require-default-prop */ import IssueCardInner from './issue_card_inner.vue'; import eventHub from '../eventhub'; +import sidebarEventHub from '~/sidebar/event_hub'; import boardsStore from '../stores/boards_store'; export default { @@ -73,6 +74,11 @@ export default { showIssue(e) { if (e.target.classList.contains('js-no-trigger')) return; + // If no issues are opened, close all sidebars first + if (!boardsStore.detail?.issue?.id) { + sidebarEventHub.$emit('sidebar.closeAll'); + } + // If CMD or CTRL is clicked const isMultiSelect = this.canMultiSelect && (e.ctrlKey || e.metaKey); |