Sortable
Sortable copied to clipboard
Drag + wheel scroll feature
I want to scroll page while dragging element. But while dragging mouse wheel not firing 'scroll' event. How to recreate that feature like in jQuery?
https://jqueryui.com/draggable/#scroll
Confirm. This feature is available in JQuery sortable and very useful when you have a large page based on drag and drop interface (like Trello or page builder) and you need to drag elements across the page.
I had the same issue and it seems the dragula
library did as well. This may help: https://www.npmjs.com/package/dom-autoscroller.
any updates about that? It's very important in my projects :-(
@TheHollidayInn can you please share your set up code, how exactly you have used this library?
yes, the example given for scroll
doesn't work in Chrome :cry:
http://jsbin.com/tutuzeh/edit?html,js,output
Also it is being used in VueDraggable library and there we have the same issue: https://github.com/SortableJS/Vue.Draggable/issues/181
Any news on this issue ? or at least a workaround ?
cant find any workaround too =(
Is this really necessary with the Autoscroll feature?
@Flame2057 i have like 1000 rows that i can sort, and when I need to drag last item to the top its really a nightmare, scroll and drag will make it super easy
+1 - any news?
This is seems like a pretty logical and mandatory feature ... I'm very happy with this library over jQuery UI - but this might be a deal breaker as we have big draggable/sortable components on a long page that we're using this for, so it's a bit counter-intuitive at the moment.
@wernerbarnard @sergeevpasha @Ikaer @geoidesic It seems that the scroll wheel does work if forceFallback: true
is specified in the options. If this option is set to false, as is by default, the browser's native drag and drop will be used, and this is what is preventing the scrollwheel from it's normal functionality.
thanks, that works now =)
Multi-drag feature is a bit buggy if you set forceFallback:true, it randomly deselects item, sometimes you have to do double click, on page load your first try to select will fail 90%. I have 2 large container and I need to transfer data from each other, so I need both multi-drag and mouse wheel scroll. I need 1 more thing, on event onMove, I'd like to access all items of multi drag, with something similar to onAdd event property items.
@Amir-Ravnjak Try increasing fallbackTolerance
a bit.
Increasing fallbackTolerance makes text being selected when you start dragging.
@Amir-Ravnjak I thought on most mobile devices that text is selected after a long touch hold, not by moving the touch. What device are you testing on?
I am testing it on PC and laptop, trying to use it with mousewheel
@Amir-Ravnjak All I can think of now is for you to set user-select: none
on the items. This can maybe be solved in a future update.
Hello, is the drag problem with mouse wheel solved? I use native drag html5 but I can't get it to work with mouse wheel
Past 5 years, but it doesn`t work yet :(
On a demo page http://sortablejs.github.io/Sortable/ I'm able to drag and automatically scroll down the page. Closing the issue
Just tested it again, using the demo page, in Brave, Opera, Edge, Chromium and Firefox, and is not working. Tested on Windows 11, last versions of these browsers. Steps to reproduce:
- Start dragging an element
- while still dragging try to scroll the page
- the page will not scroll
Facing the same issue. Any work-a-rounds?
If this plugin is working with native HTML5 Drag I don't think it's possible to do Scroll when dragging an element. This drag must be changed to one executed by Javascript and is not native to HTML5
I am facing the same issue, please reopen the issue.
This feature is not even working in demo reopen please