Document Auto-Scroll Demo

This demo tests document auto-scrolling behavior when dragging an element.
Instructions: Drag the purple element near the top or bottom edges of the viewport to trigger auto-scrolling.
The document itself is the scrollable parent, so scrolling should work throughout the entire page.

Drag Me
Drag Me (custom positioned parent)

Programmatic Controls

Ready - Click "Grab Element" to start programmatic control
absolute
fixed
sticky
Scroll: 0px

Section 1

Drag the element above towards the top edge of your viewport to test upward auto-scrolling.

Section 2

This is some content to make the page scrollable. Keep dragging down to test auto-scroll behavior.

Section 3

More content for testing. Drag the element near the bottom edge to trigger downward scrolling.

Section 4

Continue testing the auto-scroll behavior as you drag near viewport edges.

Section 5

Final section. The auto-scroll should work smoothly in both directions.