TopBar: lift header to z-20 so its popovers stack above the canvas
Browse filesThe header and the main content div are siblings, both at z-index
auto. Header's backdrop-blur gives it a stacking context at level
auto (~0), but auto vs auto means they stack in DOM order, so the
later main/canvas div renders on top of the earlier header. The
popovers inside the header (z-30) are trapped inside the header's
auto-level context and can't beat main's DOM-later z-0.
Theme popover didn't surface this because it sits in the far right
and rarely overlaps a canvas node. Papers (wider, anchored further
left) overlaps the preset blocks every time, revealing the bug.
Fix: give the header `relative z-20`. That pins the header's stacking
context above main's auto-level, so everything inside — including the
Papers and Theme popovers overhanging into the canvas area — renders
on top.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@@ -74,7 +74,7 @@ export function TopBar({
|
|
| 74 |
}
|
| 75 |
|
| 76 |
return (
|
| 77 |
-
<header className="h-14 shrink-0 border-b border-edge px-3 sm:px-5 flex items-center justify-between gap-2 sm:gap-4 bg-canvas/60 backdrop-blur">
|
| 78 |
<div className="flex items-center gap-2 sm:gap-3 min-w-0">
|
| 79 |
{mobile && onOpenLeftDrawer && (
|
| 80 |
<button
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
return (
|
| 77 |
+
<header className="relative z-20 h-14 shrink-0 border-b border-edge px-3 sm:px-5 flex items-center justify-between gap-2 sm:gap-4 bg-canvas/60 backdrop-blur">
|
| 78 |
<div className="flex items-center gap-2 sm:gap-3 min-w-0">
|
| 79 |
{mobile && onOpenLeftDrawer && (
|
| 80 |
<button
|