Chrome , Firefox, , offset, . , mouseStart , , , , . .
_mouseStart. :
$("#c").sortable({
ignoreMargins: true
});
$.ui.sortable.prototype._mouseStart = function(event, overrideHandle, noActivation) {
...
if (!this.options.ignoreMargins) {
this.offset = {
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
};
}
...
}
http://codepen.io/anon/pen/BKzeMp
EDIT:
, start stop. , , auto, , , , , .
$("#c").sortable({
start: function(e, ui) {
var marginsToSet = ui.item.data().sortableItem.margins;
ui.item.css('margin-left', marginsToSet.left);
ui.item.css('margin-top', marginsToSet.top);
},
stop: function(e, ui) {
ui.item.css('margin', '20px auto');
}
});
http://codepen.io/anon/pen/mPrdYp