From ea9392e836cb9872683158a3add6ba09a95b4e30 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 30 Apr 2024 14:40:06 +0200 Subject: [PATCH] fix(App): unstuck navbar focus on internal entries Signed-off-by: Arthur Schiwon --- src/App.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/App.vue b/src/App.vue index 52fd243aa..96f146153 100644 --- a/src/App.vue +++ b/src/App.vue @@ -71,6 +71,15 @@ export default { } else if (currentRoute.path.startsWith('/application/')) { this.$store.commit('setActiveContextId', parseInt(currentRoute.params.contextId)) this.setPageTitle(this.$store.getters.activeContext.name) + + // move the focus away from nav bar (import for app-internal switch) + const appContent = document.getElementById('app-content-vue') + const oldTabIndex = appContent.tabIndex + if (oldTabIndex === -1) { + appContent.tabIndex = 0 + } + appContent.focus() + appContent.tabIndex = oldTabIndex } }, setPageTitle(title) {