Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9934 closed bug (notabug)

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

Change History (6)

comment:1 Changed 5 years ago by tj.vantoll

Owner: set to 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/?

comment:2 Changed 5 years ago by kunalshewale

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.

comment:3 Changed 5 years ago by tj.vantoll

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.

comment:4 Changed 5 years ago by kunalshewale

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

comment:5 Changed 5 years ago by tj.vantoll

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

comment:6 in reply to:  5 Changed 5 years ago by kunalshewale

Replying to 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

Note: See TracTickets for help on using tickets.