Body scroll while dragging?
See original GitHub issueHi,
Just wanted to ask how the scroll works? I have checked the examples and if I remove overflow: auto
from the demo (.demo), it stops working. I wonder if it’s possible to make the whole page (body) to scroll while dragging?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to disable page scroll while dragging draggable in jquery?
When i drag an item of the type 'drag_area a', if i scroll the page while dragging it, the item exits from containment......
Read more >Drag to scroll - HTML DOM
The cursor: grab indicates that the element can be clicked and dragged. Scroll to given position. As long as the element is scrollable,...
Read more >Prevent scroll when dragging on mobile/tablet. #101 - GitHub
Is there any way to prevent the page from scrolling when using a drag n drop gesture on tablet/mobile? I am implementing drag...
Read more >How to keep scrolling page while dragging Tree node until ...
While I am dragging a node from a RadTreeView, I want the page to scroll up or down when the element hits a...
Read more >.scroll() | jQuery API Documentation
A scroll event is sent whenever the element's scroll position changes, regardless of the cause. A mouse click or drag on the scroll...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @ispal It’s implemented in v0.2.3. Basically the lib looks for all the elements (starting from the containers to the root) which has scrollbars and manipulates the scroll values according to the dragging positions. This search goes on until parentElement is undefined. Since window cannot be reached by parentElement it needed a special implementation which is implemented in smooth-dnd v0.5.6. Cheers!
Not sure if anyone is still having that issue, but as answered by @kutlugsahin, the workaround works just fine, at least it worked for me.
It is on the second line
<div class="overflow-y-auto h-screen">
.Hope that helps anyone.