diff --git a/src/packages/excalidraw/example/App.tsx b/src/packages/excalidraw/example/App.tsx
index 7f17b292f..8240de887 100644
--- a/src/packages/excalidraw/example/App.tsx
+++ b/src/packages/excalidraw/example/App.tsx
@@ -678,7 +678,11 @@ export default function App({ appTitle, useCustom, customArgs }: AppProps) {
gridModeEnabled={gridModeEnabled}
theme={theme}
name="Custom name of drawing"
- UIOptions={{ canvasActions: { loadScene: false } }}
+ UIOptions={{
+ canvasActions: {
+ loadScene: false,
+ },
+ }}
renderTopRightUI={renderTopRightUI}
onLinkOpen={onLinkOpen}
onPointerDown={onPointerDown}
diff --git a/src/tests/packages/__snapshots__/excalidraw.test.tsx.snap b/src/tests/packages/__snapshots__/excalidraw.test.tsx.snap
index 4caa6c6dd..d026b21ef 100644
--- a/src/tests/packages/__snapshots__/excalidraw.test.tsx.snap
+++ b/src/tests/packages/__snapshots__/excalidraw.test.tsx.snap
@@ -516,6 +516,7 @@ exports[`
Test UIOptions prop Test canvasActions should render menu
style="margin-top: 0.5rem;"
>
Canvas background
diff --git a/src/tests/packages/excalidraw.test.tsx b/src/tests/packages/excalidraw.test.tsx
index 91fd9c09f..069f9c000 100644
--- a/src/tests/packages/excalidraw.test.tsx
+++ b/src/tests/packages/excalidraw.test.tsx
@@ -199,6 +199,23 @@ describe("", () => {
);
//open menu
toggleMenu(container);
+ expect(queryByTestId(container, "canvas-background-label")).toBeNull();
+ expect(queryByTestId(container, "canvas-background-picker")).toBeNull();
+ });
+
+ it("should hide the canvas background picker even if passed if the `canvasActions.changeViewBackgroundColor` is set to false", async () => {
+ const { container } = await render(
+
+
+
+
+ ,
+ );
+ //open menu
+ toggleMenu(container);
+ expect(queryByTestId(container, "canvas-background-label")).toBeNull();
expect(queryByTestId(container, "canvas-background-picker")).toBeNull();
});