From 070fc0a56ddb941e26a098ba7207b5d1e91b7b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Sun, 10 Sep 2023 16:36:09 +0200 Subject: [PATCH] feat(theme): use inert to avoid traverse menus and content with keyboard (#2932) --- src/client/theme-default/Layout.vue | 17 ++++++++++------- .../theme-default/components/VPSkipLink.vue | 18 ++++++++++-------- src/client/theme-default/composables/nav.ts | 4 ++-- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/client/theme-default/Layout.vue b/src/client/theme-default/Layout.vue index 52bb16b2..34bd53dd 100644 --- a/src/client/theme-default/Layout.vue +++ b/src/client/theme-default/Layout.vue @@ -9,13 +9,16 @@ import VPNav from './components/VPNav.vue' import VPSidebar from './components/VPSidebar.vue' import VPSkipLink from './components/VPSkipLink.vue' import { useData } from './composables/data' +import { useNav } from './composables/nav' import { useCloseSidebarOnEscape, useSidebar } from './composables/sidebar' const { isOpen: isSidebarOpen, open: openSidebar, - close: closeSidebar + close: closeSidebar, + isSidebarEnabled, } = useSidebar() +const { isScreenOpen } = useNav() const route = useRoute() watch(() => route.path, closeSidebar) @@ -33,9 +36,9 @@ provide('hero-image-slot-exists', heroImageSlotExists)