We are currently trying to accomplish cross-frame dragging between draggables and sortables provided by jQuery UI. This is working properly now. However, the mouse offset seems off when dragging from the parent to the child frame--please see this fiddle: http://jsfiddle.net/r5nfe/6/.
Code in the parent:
$('#my-frame').load(function () {
$('.draggable').draggable({
appendTo: 'body',
helper: 'clone',
iframeFix: true,
revert: 'invalid',
connectToSortable: $('#my-frame').contents().find('.sortable'),
cursorAt: { top: 0, left: 0 }
});
$('#my-frame').contents().find('.sortable').sortable({
iframeFix: true,
cursorAt: { top: 0, left: 0 }
});
});
Code in the child frame:
var containers = $('.sortable');
containers.sortable({
connectWith: containers,
cursor: 'move',
revert: true,
cursorAt: { top: 0, left: 0 }
});
Can someone please tell us how to fix the mouse offset?
sortable.refreshPositions();