From b986e6c322dda52180f8659eaf8e3620e17aaea5 Mon Sep 17 00:00:00 2001 From: fatadel Date: Fri, 30 Jan 2026 10:41:24 +0100 Subject: [PATCH 1/2] fix hover preview appearing above context menu --- src/components/app/KeyboardShortcut.css | 1 + src/components/app/ProfileViewer.css | 8 ++++---- src/components/app/ProfileViewer.tsx | 2 +- src/components/shared/ContextMenu.css | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/app/KeyboardShortcut.css b/src/components/app/KeyboardShortcut.css index 3898f85c5a..b5ab24d175 100644 --- a/src/components/app/KeyboardShortcut.css +++ b/src/components/app/KeyboardShortcut.css @@ -8,6 +8,7 @@ --internal-shadow-color: rgb(0 0 0 / 0.4); position: absolute; + z-index: 11; /* should be highest possible value */ top: 0; left: 0; display: none; diff --git a/src/components/app/ProfileViewer.css b/src/components/app/ProfileViewer.css index 36b349703b..1fdf52b78f 100644 --- a/src/components/app/ProfileViewer.css +++ b/src/components/app/ProfileViewer.css @@ -110,11 +110,11 @@ } .profileViewerSplitter { - /* Create a stacking context, so that the KeyboardShortcut can overlay the profile - viewer. In addition, the built-in class uses position: absolute, which is not - appropriate here. */ + /* Position relative for layout. Don't set z-index here to avoid creating a + stacking context that would trap the context menu below the screenshot hover. + This allows both the screenshot hover and context menu to be compared + at the .profileViewer level, ensuring the context menu appears on top. */ position: relative; - z-index: 0; } .profileViewerSplitter > .layout-pane:not(.layout-pane-primary) { diff --git a/src/components/app/ProfileViewer.tsx b/src/components/app/ProfileViewer.tsx index dcfeafcb9c..e00a87117d 100644 --- a/src/components/app/ProfileViewer.tsx +++ b/src/components/app/ProfileViewer.tsx @@ -103,7 +103,6 @@ class ProfileViewerImpl extends PureComponent { } as React.CSSProperties) } > -
{hasZipFile ? (