When applying dragConstraints with a ref (position: absolute, top, left, bottom, right: 0), the behavior is as follows:
Without scrolling, the draggable element can move freely within the entire viewport area. However, after scrolling, the draggable element is constrained to move only within the viewport area minus the scrolled height.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
1. Read the FAQs 👇 ✅ 2. Describe the bug
When applying dragConstraints with a ref (position: absolute, top, left, bottom, right: 0), the behavior is as follows:
Without scrolling, the draggable element can move freely within the entire viewport area. However, after scrolling, the draggable element is constrained to move only within the viewport area minus the scrolled height.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://stackblitz.com/edit/vitejs-vite-gdmqjk?file=src%2FApp.tsx
4. Steps to reproduce
5. Expected behavior
Even when the page is scrolled, the element should be draggable to the bottom of the viewport.
6. Video or screenshots
https://github.com/user-attachments/assets/3ed7eeca-1e1b-4cde-99e5-9b3ee90f32f1
7. Environment details
mac 15, chrome