diff --git a/packages/excalidraw/components/PropertiesPopover.tsx b/packages/excalidraw/components/PropertiesPopover.tsx index 571898f9d1..729c854295 100644 --- a/packages/excalidraw/components/PropertiesPopover.tsx +++ b/packages/excalidraw/components/PropertiesPopover.tsx @@ -4,7 +4,7 @@ import React, { type ReactNode } from "react"; import { isInteractive } from "@excalidraw/common"; -import { useApp, useDevice } from "./App"; +import { useDevice } from "./App"; import { Island } from "./Island"; interface PropertiesPopoverProps { @@ -40,17 +40,14 @@ export const PropertiesPopover = React.forwardRef< ref, ) => { const device = useDevice(); - const app = useApp(); - const { offsetTop, offsetLeft } = app.state; - const collisionPadding = container ? (() => { const rect = container.getBoundingClientRect(); return { - top: Math.max(8, rect.top), - right: Math.max(8, window.innerWidth - rect.right - offsetLeft), - bottom: Math.max(8, window.innerHeight - rect.bottom - offsetTop), - left: Math.max(8, rect.left), + top: 8, + right: Math.max(8, window.innerWidth - rect.right), + bottom: Math.max(8, window.innerHeight - rect.bottom), + left: 8, }; })() : 8;