Opened 7 years ago
Last modified 7 years ago
#14902 new bug
JQuery UI Sortable strange placeholder behaviour
Reported by: | joetidee | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | none |
Component: | ui.sortable | Version: | 1.11.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using this JSFiddle example:
https://jsfiddle.net/353fa42p/4/
If you drag 'item 4' up the left-hand side of the list the placeholder does not appear. Now, if you reset the positions, then drag 'item 4' up the right-hand side of the list, the placeholder shows ok ! Now, if you then rest the positions again and open 'item 5' up, then drag 'item 4' up the list, the placeholder works ok no matter what side of the list it is dragged! Any ideas as to what is causing this erratic behaviour?
Change History (2)
comment:2 Changed 7 years ago by
To follow on from the above comment by antishok, when 'item 5' is collapsed again (after the sortable has been initialised), the strange behaviour returns. This meant that the workaround was to destroy the sortable when 'item 5' was hidden and re-initialise it when 'item 5' was made visible.
Updated JSfiddle: https://jsfiddle.net/353fa42p/7/
Copying what I replied on IRC:
I can't say what the problem/bug is exactly, but my first thought was that it might have to do with you initializing a .sortable on a hidden element. so tried working around it by initializing .sortable only when it's visible, and it seems to maybe have fixed the issue.
Updated fiddle: https://jsfiddle.net/353fa42p/5/
Possibly a duplicate of #8302 ?