Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 7 years ago by dma_k

Sorry, I have missed the component: it should be "ui.sortable". Also I can add that calling sortable('refresh') or sortable('refreshPositions') after tab control is constructed does not help.

comment:2 Changed 7 years ago by tj.vantoll

Resolution: duplicate
Status: newclosed

Duplicate of #7498.

comment:3 Changed 7 years ago by tj.vantoll

As a workaround you can set the internal floating flag after initialization: http://jsfiddle.net/tj_vantoll/qvquupp4/

comment:4 Changed 7 years ago by dma_k

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.

Note: See TracTickets for help on using tickets.