#10678 closed bug (duplicate)
Sortable: Not possible to drag the item in some cases when initial list was empty
Reported by: | dma_k | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.core | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This demo (http://jsfiddle.net/5yskuyg5/8/) shows two lists:
One in the top is created from static HTML content and is working fine in relation to the problem being described. One on the bottom is created dynamically from JavaScript, but has the content identical to the top. There is no extra or special CSS – two lists are applied the same styles.
After the demo is loaded, I drag the middle tab (History) of the bottom tab control to the end. When dragging I place the mouse above the tabs control (e.g. higher then top of <ul>
element) – this makes the problem always reproducible. As the result, I cannot drop this tab to the end of the list, see this screenshot. Expected in given case that "Alternatives" tab is shifted to the left and "History" tab is allowed to be put to the end. The same problem can be observed also when dragging the item to the middle, or to the beginning and the problem may or may not be seen, depending on how you move the mouse.
Tested on: FF v33, FF v21, Chrome v38 (all on Win7 x64)
Change History (4)
comment:1 Changed 8 years ago by
comment:3 Changed 8 years ago by
As a workaround you can set the internal floating
flag after initialization: http://jsfiddle.net/tj_vantoll/qvquupp4/
comment:4 Changed 8 years ago by
Many thanks for workaround! It worked fine. Pity that fix is still not in sortable('refresh')
– it could have saved my time to debug the problem.
Sorry, I have missed the component: it should be "ui.sortable". Also I can add that calling
sortable('refresh')
orsortable('refreshPositions')
after tab control is constructed does not help.