Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix bg color picker rendered behind shape menu (#1445)

David Luzar8cfc64a3ab85
diff --git a/src/components/Island.css b/src/components/Island.css
index cea8c533a4..bca91f08ed 100644
--- a/src/components/Island.css
+++ b/src/components/Island.css
@@ -5,4 +5,5 @@
box-shadow: var(--shadow-island);
border-radius: var(--border-radius-m);
padding: calc(var(--padding) * var(--space-factor));
+ position: relative;
}
diff --git a/src/components/Island.tsx b/src/components/Island.tsx
index c4ef6ebc48..08ae1c8974 100644
--- a/src/components/Island.tsx
+++ b/src/components/Island.tsx
@@ -6,13 +6,14 @@ type IslandProps = {
children: React.ReactNode;
padding?: number;
className?: string;
+ style?: object;
};
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
- ({ children, padding, className }, ref) => (
+ ({ children, padding, className, style }, ref) => (
<div
className={`${className ?? ""} Island`}
- style={{ "--padding": padding } as React.CSSProperties}
+ style={{ "--padding": padding, ...style } as React.CSSProperties}
ref={ref}
>
{children}
diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx
index 114e7139be..64c18b30c9 100644
--- a/src/components/LayerUI.tsx
+++ b/src/components/LayerUI.tsx
@@ -125,7 +125,9 @@ export const LayerUI = React.memo(
<div className="App-menu App-menu_top">
<Stack.Col gap={4}>
<Section heading="canvasActions">
- <Island padding={4}>
+ {/* the zIndex ensures this menu has higher stacking order,
+ see https://github.com/excalidraw/excalidraw/pull/1445 */}
+ <Island padding={4} style={{ zIndex: 1 }}>
<Stack.Col gap={4}>
<Stack.Row gap={1} justifyContent={"space-between"}>
{actionManager.renderAction("loadScene")}