Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

Doesn't work with tables.

Open paganaye opened this issue 9 years ago • 7 comments

The script work well with lists. But less well when there is a margin between items And doesn't work with with tables http://codepen.io/paganaye/pen/WpEGmG

paganaye avatar Mar 14 '17 16:03 paganaye

Seem <div> can stand alone but <tr> should be wrapped by <table>. You can refer flex box to display dive as table.

phuong avatar Mar 31 '17 07:03 phuong

@paganaye it does work, it's just not the most elegant thing. table borders remain in place, but the rows themselves can be dragged around.

I forked your code: http://codepen.io/jlapinski/pen/gmZQBg

I really haven't looked into this much, but I believe if you want your <tr> to be draggable, you must init with Sortable.create with the <tr>'s immediate parent, <tbody>

aintJoshinya avatar Mar 31 '17 19:03 aintJoshinya

I am happy with ainJoshinya response and am closing this request.

paganaye avatar Jun 09 '17 20:06 paganaye

While using Sortable on the tbody works fine in Safari (10.0.1, macOS Sierra), I'm having issues where nested (inside the td) <img> and <input> elements disappear from the dragged item. In fact, the background disappears (it's fully transparent), unlike Chrome, which behaves as expected.

This can be observed in the example @aintJoshinya gave as well: http://codepen.io/jlapinski/pen/gmZQBg (input disappears, no green background)

cc @RubaXa could this be a race-condition, where the dragClass is not applied in time for the 'snapshot' (image) to be constructed by Safari?

fabien avatar Jul 07 '17 12:07 fabien

I'm experiencing the same issue as described by @fabien. The dragClass is not applied in Safari (background stays fully transparent)

mitomm avatar Dec 12 '17 00:12 mitomm

I'm experiencing the same [roblem as @mitomm i.e. transparent background on dragged row.

ghost avatar Feb 16 '19 14:02 ghost

@thelucid It seems to be working for me in MacOS Mojave w/ Safari 12. Are you using the latest version of Sortable (1.8.3)?

1062

owen-m1 avatar Mar 09 '19 00:03 owen-m1