Skip to content

Commit a2fb110

Browse files
committed
Pass the sidebar as additional focus trap element
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 728881a commit a2fb110

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/views/Viewer.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
:data-handler="handlerId"
4343
@close="close"
4444
@previous="previous"
45+
:additional-trap-elements="trapElements"
4546
@next="next">
4647
<!-- ACTIONS -->
4748
<template #actions>
@@ -190,6 +191,8 @@ export default {
190191
theme: null,
191192
root: getRootPath(),
192193
handlerId: '',
194+
195+
trapElements: [],
193196
}
194197
},
195198
@@ -750,11 +753,13 @@ export default {
750753
const sidebar = document.querySelector('aside.app-sidebar')
751754
if (sidebar) {
752755
this.sidebarWidth = sidebar.offsetWidth
756+
this.trapElements = [sidebar]
753757
}
754758
},
755759
756760
handleAppSidebarClose() {
757761
this.isSidebarShown = false
762+
this.trapElements = []
758763
},
759764
760765
onResize(event) {

0 commit comments

Comments
 (0)