Yuchen Yuan Claude Opus 4.7 commited on
Commit ·
5c7e83b
1
Parent(s): 2ed1d6e
Papers popover: match ThemeSwitcher structure (absolute + z-30)
Browse filesDrop the mobile-specific `fixed right-3 top-14` positioning. That
fixed+z-index combo created a separate stacking context that landed
behind the React Flow canvas in the backdrop-blur header's layer,
which is why the canvas nodes bled through. ThemeSwitcher never had
this problem because it uses plain `absolute z-30`.
Match it: `absolute right-0 top-full mt-1 z-30`, and rely on the
`w-[min(22rem,100vw-1.5rem)]` cap to keep the popover on-screen on
narrow viewports.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
frontend/src/components/TopBar.tsx
CHANGED
|
@@ -236,17 +236,16 @@ function PapersPopover() {
|
|
| 236 |
<span className="hidden sm:inline">Papers</span>
|
| 237 |
</button>
|
| 238 |
{open && (
|
| 239 |
-
//
|
| 240 |
-
// the
|
| 241 |
-
//
|
| 242 |
-
//
|
| 243 |
-
//
|
| 244 |
-
//
|
| 245 |
-
//
|
| 246 |
-
// menu tracks with the header cluster.
|
| 247 |
<div
|
| 248 |
role="menu"
|
| 249 |
-
className="
|
| 250 |
>
|
| 251 |
{papers.map((p) => (
|
| 252 |
<a
|
|
|
|
| 236 |
<span className="hidden sm:inline">Papers</span>
|
| 237 |
</button>
|
| 238 |
{open && (
|
| 239 |
+
// Same positioning strategy as ThemeSwitcher: absolute right-0
|
| 240 |
+
// of the button so the menu tracks with the header cluster, and
|
| 241 |
+
// `w-[min(22rem,100vw-1.5rem)]` caps the width on narrow screens
|
| 242 |
+
// so it can't overflow the viewport's right edge. We do NOT use
|
| 243 |
+
// `position: fixed` here — fixed+z-index creates a new stacking
|
| 244 |
+
// context that can land behind the React Flow canvas in the
|
| 245 |
+
// backdrop-blur header's layer.
|
|
|
|
| 246 |
<div
|
| 247 |
role="menu"
|
| 248 |
+
className="absolute right-0 top-full mt-1 rounded-lg border border-edge bg-surface shadow-xl z-30 p-2 flex flex-col gap-0.5 w-[min(22rem,calc(100vw-1.5rem))]"
|
| 249 |
>
|
| 250 |
{papers.map((p) => (
|
| 251 |
<a
|