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.

revert shifting cursor position when scrubbing

Oleg Isonen5d5fd4b10cdc
diff --git a/packages/design-system/src/components/primitives/numeric-gesture-control.ts b/packages/design-system/src/components/primitives/numeric-gesture-control.ts
index 76438fd2ed..10eca62c7d 100644
--- a/packages/design-system/src/components/primitives/numeric-gesture-control.ts
+++ b/packages/design-system/src/components/primitives/numeric-gesture-control.ts
@@ -154,11 +154,9 @@ const requestPointerLock = (
cursorNode.style.filter = `drop-shadow(${
state.direction === "horizontal" ? "0 1px" : "1px 0"
} 1.1px rgba(0,0,0,.4))`;
- // avoid obscuring anything that could be behind the cursor by offseting it after the target
- const { top, height } = targetNode.getBoundingClientRect();
cursorNode.style.position = "absolute";
cursorNode.style.left = `${event.clientX}px`;
- cursorNode.style.top = `${top + height}px`;
+ cursorNode.style.top = `${event.clientY}px`;
cursorNode.style.transform = `translate(-50%, -50%) ${
state.direction === "horizontal" ? "rotate(0deg)" : "rotate(90deg)"
}`;