Skip to content

Commit 83f3563

Browse files
authored
Merge pull request #5400 from akolson/fix-sidepabel-focus-trap
add focus trapping to resource preview side panel
2 parents 8a20813 + 0e48116 commit 83f3563

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

contentcuration/contentcuration/frontend/channelEdit/components/ResourceDrawer.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
@scroll="$emit('scroll', $event)"
1717
>
1818
<div
19+
ref="rootEl"
1920
class="pa-4"
2021
style="margin-bottom: 64px"
2122
>
@@ -43,15 +44,26 @@
4344

4445
<script>
4546
47+
import { ref } from 'vue';
4648
import ResourcePanel from './ResourcePanel';
4749
import ResizableNavigationDrawer from 'shared/views/ResizableNavigationDrawer';
50+
import { useFocusTrap } from 'shared/views/TipTapEditor/TipTapEditor/composables/useFocusTrap';
4851
4952
export default {
5053
name: 'ResourceDrawer',
5154
components: {
5255
ResizableNavigationDrawer,
5356
ResourcePanel,
5457
},
58+
setup() {
59+
const rootEl = ref(null);
60+
61+
useFocusTrap(rootEl);
62+
63+
return {
64+
rootEl,
65+
};
66+
},
5567
props: {
5668
// key for sessionStorage to store width data at
5769
localName: {

0 commit comments

Comments
 (0)