Search and Top Navigation
#8500 closed bug (notabug)
Opened August 14, 2012 07:12PM UTC
Closed August 14, 2012 08:38PM UTC
Sortable items with scrollbar-scrolling triggers drag event
Reported by: | davidhglassb@gmail.com | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.sortable | Version: | 1.8.22 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you have any sortable elements with a specified height and overflow-y: scroll, scrolling on it will trigger the drag event. I'd like to know if this is a bug or intended behavior and, if so, is there a workaround for it.
I submitted a request for help on this on stackoverflow. The link, together with code examples, can be found here:
http://stackoverflow.com/questions/11455614/jquery-ui-nested-sortable-and-scrolling
This ticket can be closed.
I found a workaround, or maybe even a solution.
Add a wrapper element, such as a div outside the scrollable content (content with overflow: scroll). Use the selector for that wrapper as your "cancel" option as follows:
$(".meh").each(function(){
$(this).sortable({cancel: ".scrollable"});
});