From 44953dcd1e0224bae95666c87e368b9d3fdf17ae Mon Sep 17 00:00:00 2001 From: Curt Grimes Date: Mon, 15 Aug 2022 03:22:54 -0500 Subject: [PATCH] fix(theme): don't let navbar obstruct clicks to top part of scrollbar (#1168) --- src/client/theme-default/components/VPNav.vue | 1 + src/client/theme-default/components/VPNavBar.vue | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/client/theme-default/components/VPNav.vue b/src/client/theme-default/components/VPNav.vue index 2331d085..962072a0 100644 --- a/src/client/theme-default/components/VPNav.vue +++ b/src/client/theme-default/components/VPNav.vue @@ -33,6 +33,7 @@ provide('close-screen', closeScreen) left: 0; z-index: var(--vp-z-index-nav); width: 100%; + pointer-events: none; } @media (min-width: 960px) { diff --git a/src/client/theme-default/components/VPNavBar.vue b/src/client/theme-default/components/VPNavBar.vue index 0791f156..fbcd157c 100644 --- a/src/client/theme-default/components/VPNavBar.vue +++ b/src/client/theme-default/components/VPNavBar.vue @@ -54,6 +54,11 @@ const { hasSidebar } = useSidebar() padding: 0 8px 0 24px; height: var(--vp-nav-height-mobile); transition: border-color 0.5s, background-color 0.5s; + pointer-events: none; +} + +.VPNavBar .container:deep(*) { + pointer-events: all; } @media (min-width: 768px) { @@ -96,6 +101,7 @@ const { hasSidebar } = useSidebar() justify-content: space-between; margin: 0 auto; max-width: calc(var(--vp-layout-max-width) - 64px); + pointer-events: none; } .content {