Skip to main content

Search and Top Navigation

#9934 closed bug (notabug)

Opened March 27, 2014 06:00AM UTC

Closed March 27, 2014 02:45PM UTC

Last modified March 31, 2014 06:06AM UTC

Draggable element in sortable goes out of scrollbar

Reported by: kunalshewale Owned by: kunalshewale
Priority: minor Milestone: none
Component: ui.sortable Version: 1.10.0
Keywords: Cc:
Blocked by: Blocking:
Description

I Have a long nested list to which i apply overflow-y:Auto, each of the element has sortable widget attached to it.

Now the issue which we are facing is that the drag-gable element goes out of scroll-bar container which is not desirable, i do understand that the position is set to absolute and z-Index to 1000 and i also understand while dragging the element it takes into consideration the height of the parent element and it let me drag up-to that calculated height only.

Changing the position to relative makes me drag the element only inside the scrollbar but then also the hieght it lets me drag upto is too much.

Desired Behavior:We should be able to drag the element only inside the scrollbar and that too not beyond the last element bottom offset position.

Js fiddle link for the issue is : http://jsfiddle.net/6mf8f/

Youtube Video Explaining the same issue: http://youtu.be/K08GJCqaH3k

Attachments (0)
Change History (6)

Changed March 27, 2014 12:46PM UTC by tj.vantoll comment:1

owner: → kunalshewale
status: newpending

Hi kunalshewale,

Thanks for taking the time to contribute to jQuery UI. I assume you're trying to do this: http://jsfiddle.net/tj_vantoll/t7R4D/?

Changed March 27, 2014 12:52PM UTC by kunalshewale comment:2

status: pendingnew

Thanks for the update however my requirement is that none of draggable element should go out of the scrollable area i.e. even the parent (green in this case) should not be draggable beyond the scrollable area.

Changed March 27, 2014 02:45PM UTC by tj.vantoll comment:3

resolution: → notabug
status: newclosed

You can do that by moving the containment to the outer

<div>
you already have: http://jsfiddle.net/tj_vantoll/t7R4D/4/.

For further help please use the forums or Stack Overflow.

Changed March 28, 2014 08:39AM UTC by kunalshewale comment:4

Thanks for the help.

I have tried for the help over forum as well as Stack Overflow but didn't found anything useful.

Please find below link for the exact scenario where I am getting the issue.

JsFiddle - http://jsfiddle.net/hK7YT/2/

Youtube - http://youtu.be/PKqKeSYpu2c

Changed March 28, 2014 12:30PM UTC by tj.vantoll comment:5

If you post a link to a Stack Overflow / forum thread I can try to help you further there.

Changed March 31, 2014 06:06AM UTC by kunalshewale comment:6

Replying to [comment:5 tj.vantoll]:

If you post a link to a Stack Overflow / forum thread I can try to help you further there.

Hi,

Please find below the link for the Stack Overflow:

Stack Overflow - http://stackoverflow.com/questions/22754603/draggable-element-in-sortable-goes-out-of-scrollbar