jquery-sortable icon indicating copy to clipboard operation
jquery-sortable copied to clipboard

Not compatible with jquery 3.3.0+

Open bitno2u opened this issue 1 year ago • 6 comments

Draggable list elements only can be put at the bottom of the list. They can not be dragged inside any connected lists placed on right, bellow or diagonally. Can you fix this?

bitno2u avatar May 25 '23 07:05 bitno2u

Ad-hoc solution: Change jquery 3.3.x file instead
(offsetParent === doc.body || offsetParent === doc.documentElement) && insert
(offsetParent !== doc && offsetParent !== doc.body && offsetParent !== doc.documentElement) &&

For morde details look https://github.com/jquery/jquery/pull/3887/commits/5e7e4d7382224dfbc8e348796439c002013b4191#diff-62d55137fbe4b552f5a996d0af19023a42aeed89686647e7b4e4026fd1a66186

bitno2u avatar May 26 '23 06:05 bitno2u

Better solution: Change jquery-sortable.js

instead if (el.css("position") === "relative" || el.css("position") === "absolute" || el.css("position") === "fixed") insert if (el.css("position") === "relative" || el.css("position") === "absolute" || el.css("position") === "fixed" || el.css("position") === "static")

bitno2u avatar May 26 '23 08:05 bitno2u

@bitno2u They can not be dragged inside any connected lists placed on right, bellow or diagonally - I was trying to replicate this issue with my project but couldn't do it. Could you please help with some more detail.

venkatt05 avatar Oct 10 '23 13:10 venkatt05

Download jquery-sortable.js v0.9.13 and add "static" as an option for el.css("position"), as described before.

bitno2u avatar Oct 12 '23 07:10 bitno2u

Yes, I got that part. I wanted to reproduce the issue in my system. I was using the 0.9.13 and jQuery 3.3.1, but I can't able to replicate the issue reported here. Is this issue happening is any specific scenario ?

venkatt05 avatar Oct 12 '23 13:10 venkatt05

I ran into this issue as well. For me it only affects sorting within tables. I tried adding el.css("position") === "static" as recommended above which does help, but there's still considerable offset on the sorting. I ended up changing the table to divs to work around this.

ryanb avatar Oct 31 '23 22:10 ryanb