Search and Top Navigation
#14902 new bug ()
Opened January 17, 2016 05:55PM UTC
Last modified January 22, 2016 11:05AM UTC
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?
Attachments (0)
Change History (2)
Changed January 22, 2016 01:15AM UTC by comment:1
_comment0: | 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/] → 1453426294617775 |
---|
Changed January 22, 2016 11:04AM UTC by comment:2
_comment0: | 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. Thsi means that the workaround was to destroy the sortable to be whenever 'item 5' was hidden and re-initialise it when 'item 5' is made visible. \ \ Updated JSfiddle: https://jsfiddle.net/353fa42p/7/ → 1453460730481733 |
---|
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 ?