Skip to content

Commit

Permalink
Pass the sidebar as additional focus trap element
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Aug 12, 2022
1 parent 728881a commit a2fb110
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:data-handler="handlerId"
@close="close"
@previous="previous"
:additional-trap-elements="trapElements"
@next="next">
<!-- ACTIONS -->
<template #actions>
Expand Down Expand Up @@ -190,6 +191,8 @@ export default {
theme: null,
root: getRootPath(),
handlerId: '',
trapElements: [],
}
},
Expand Down Expand Up @@ -750,11 +753,13 @@ export default {
const sidebar = document.querySelector('aside.app-sidebar')
if (sidebar) {
this.sidebarWidth = sidebar.offsetWidth
this.trapElements = [sidebar]
}
},
handleAppSidebarClose() {
this.isSidebarShown = false
this.trapElements = []
},
onResize(event) {
Expand Down

0 comments on commit a2fb110

Please sign in to comment.