File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323<template >
2424 <NcAppSidebar v-if =" currentBoard && currentCard"
25+ ref =" cardSidebar"
2526 :active =" tabId"
2627 :name =" title"
2728 :subname =" subtitle"
3031 @update:nameEditable =" handleUpdateTitleEditable"
3132 @update:name =" handleUpdateTitle"
3233 @submit-name =" handleSubmitTitle"
34+ @opened =" focusHeader"
3335 @close =" closeSidebar" >
3436 <template #secondary-actions >
3537 <NcActionButton v-if =" cardDetailsInModal && isFullApp" icon =" icon-menu-sidebar" @click.stop =" closeModal()" >
@@ -170,7 +172,15 @@ export default {
170172 },
171173 },
172174 },
175+ watch: {
176+ currentCard () {
177+ this .focusHeader ()
178+ },
179+ },
173180 methods: {
181+ focusHeader () {
182+ this .$refs .cardSidebar .$el .querySelector (' .app-sidebar-header__mainname' ).focus ()
183+ },
174184 handleUpdateTitleEditable (value ) {
175185 this .titleEditable = value
176186 if (value) {
You can’t perform that action at this time.
0 commit comments