Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in current position (data.rslt.cp) #26

Closed
jsword opened this issue May 30, 2011 · 1 comment
Closed

Bug in current position (data.rslt.cp) #26

jsword opened this issue May 30, 2011 · 1 comment

Comments

@jsword
Copy link

jsword commented May 30, 2011

This issue is reproducable on the PHP + mySQL demo on the jsTree demo page.

Example:

  • a (position 1)
  • b (position 2)
  • c (position 3)
    move c between a and b: cp=1
    move a between b and c: cp=2

The cp reports a different position even though the node is being dropped in the same place.
You will notice that the nodes now appear as expected: c, a, b.
Refresh the page in your browser.
You will now notice that the order of the nodes has changed to c, b, a.

This issue was initially reported by Daco Harkes in Feb 2010
https://groups.google.com/d/topic/jstree/AnZq7PYHYo0/discussion

@vakata
Copy link
Owner

vakata commented Jul 11, 2011

This is fixed in 1.0. Actually when reordering nodes it is quite hard to say which is the correct way to report the position. I believe v.1.0 is better, but v.pre1.0 is configured otherwise and most users have dealt with this in their own code, so I won't be fixing this in pre1.0, only in 1.0.

@vakata vakata closed this as completed Jul 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants