Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix

Roman Pominovd1ece253117e
diff --git a/apps/designer/app/shared/design-system/components/primitives/dnd/use-auto-scroll.ts b/apps/designer/app/shared/design-system/components/primitives/dnd/use-auto-scroll.ts
index e965d0481f..94db02e4ac 100644
--- a/apps/designer/app/shared/design-system/components/primitives/dnd/use-auto-scroll.ts
+++ b/apps/designer/app/shared/design-system/components/primitives/dnd/use-auto-scroll.ts
@@ -1,6 +1,6 @@
import { useRef, type MutableRefObject } from "react";
-// Time between framse of scroll animation in milliseconds
+// Time between frames of scroll animation in milliseconds
const FRAME_PERIOD = 30;
const getSpeed = (
@@ -16,8 +16,8 @@ const getSpeed = (
edgeDistanceThreshold
);
- const startAdjusted = containerStart + edgeDistanceThreshold;
- const endAdjusted = containerEnd - edgeDistanceThreshold;
+ const startAdjusted = containerStart + thresholdSafe;
+ const endAdjusted = containerEnd - thresholdSafe;
const distanceToSpeed = (distance: number) => {
// between 0 and 1