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:


Using this JSFiddle example:

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:1 Changed 7 years ago by Uri Gilad

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:

Possibly a duplicate of #8302 ?

Last edited 7 years ago by Uri Gilad (previous) (diff)

comment:2 Changed 7 years ago by joetidee

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:

Last edited 7 years ago by joetidee (previous) (diff)
Note: See TracTickets for help on using tickets.