Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8794 closed bug (duplicate)

sortable distance parameter does not work

Reported by: domnulnopcea Owned by: domnulnopcea
Priority: minor Milestone: 1.10.0
Component: ui.sortable Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

I have a table with 4 large columns (250px in width)

I want to make them sortable but when I set the distance parameter it seems not to work

when I move the first column over the last one in order to make it move it wan't move... if there would be more space to the right it would work

for example when I try to move the first column over the second one I have to go more than 100 pixels in order the the change in order actually takes place

Change History (15)

comment:1 Changed 7 years ago by tj.vantoll

Owner: set to domnulnopcea
Status: newpending

Thanks for taking the time to contribute to the jQuery UI project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the git version of both jQuery UI and jQuery to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 7 years ago by domnulnopcea

Status: pendingnew

jsfiddle link

http://jsfiddle.net/domnulnopcea/AUQhs/1/

please move second column over to the last one...it will not work

comment:3 Changed 7 years ago by Scott González

Status: newpending

I'm not sure how this is related to the distance option. Also, you'll notice that it depends on where you start to drag from (the left side of the sortable item or the right side). If you set tolerance: "pointer", you'll see that it works as soon as your pointer touches the items.

Can you please explain again what you were trying to do and how the distance option comes in to play?

comment:4 Changed 7 years ago by domnulnopcea

Status: pendingnew

As I understand the distance property is the following: as I move the cursor distance pixels the next column will move. is this wrong?

otherwise I could use tolerance but this does not allow me to specify how many pixels in overlapping should be accepted until the sort occurs. is there a way to do that?

thanks!

comment:5 Changed 7 years ago by mikesherov

Status: newpending

Please see this demo for how to use the distance option: http://jqueryui.com/sortable/#delay-start. In the meantime, this sounds like a duplicate of #5772. Can you confirm?

comment:6 Changed 7 years ago by domnulnopcea

Status: pendingnew

ok, I get it!

yes it is a duplication of 5772

thanks

comment:7 Changed 7 years ago by mikesherov

Resolution: duplicate
Status: newclosed

Duplicate of #5772.

comment:8 Changed 7 years ago by domnulnopcea

I have put the tolerance parameter now, and I get this error:

TypeError: $(this).data("draggable") is undefined

when I try to drag a column the column gets moved to the top of the screen and everything from here goes wrong...

comment:9 Changed 7 years ago by Scott González

I'm not seeing any errors. I'm also not sure why these elements are draggable. Please ask for help on the forums or StackOverflow. If you feel you've found a new bug, please file a new ticket with a reduced test case.

comment:10 Changed 7 years ago by domnulnopcea

here is a simple test case where this error occurs

http://jsfiddle.net/domnulnopcea/fx4L4/1/

I have read a lot on google... I see that this error you say that it is fixed...but it seems it is not fixed!

comment:11 Changed 7 years ago by domnulnopcea

just try to move the column by where you see the string "aaaaa"

comment:12 Changed 7 years ago by domnulnopcea

are you able to reproduce the error I'm describing?

comment:13 Changed 7 years ago by mikesherov

This is a duplicate of a known issue. So, yes, it's been reproduced. Follow #5772 for more info.

comment:14 Changed 7 years ago by domnulnopcea

hi, it is not acctually!

if you look to the last jsfiddle I gave you and try to move the column by the string "aaaa" you will see very strange behaviour. the columns will just fly to the top of the screen.

comment:15 Changed 7 years ago by mikesherov

Please create a new bug report with repro steps as you are now reporting a different error from the original one, which is a duplicate of #5772. Thanks!

Note: See TracTickets for help on using tickets.