initial offset click for desktop only

This commit is contained in:
Josh Hawkins 2024-03-08 13:16:55 -06:00
parent 3d539c93eb
commit fc09de1b3e

View File

@ -83,7 +83,7 @@ function useDraggableHandler({
getClientYPosition(e); getClientYPosition(e);
setIsDragging(true); setIsDragging(true);
if (scrollTimeRef.current && clientYPosition) { if (scrollTimeRef.current && clientYPosition && isDesktop) {
const handlebarRect = scrollTimeRef.current.getBoundingClientRect(); const handlebarRect = scrollTimeRef.current.getBoundingClientRect();
setInitialClickAdjustment(clientYPosition - handlebarRect.top); setInitialClickAdjustment(clientYPosition - handlebarRect.top);
} }