我在 iframe 表 trs 中有可拖动和可放置(jquery)。它在 chrome 和 ie 中正常工作,但是当我想在 FF 中拖放时,我必须单击 2 次才能更改 trs。
$(this).draggable({ helper: 'clone', iframeFix: true, cursor: "move", cursorAt: { top: 600, left: 155 } });
$(childrensDraggableZone).droppable({
accept: '.dragdrop',
activeClass: "ui-state-hover",
hoverClass: "ui-state-active",
drop: function(event, ui) {
var draggable = ui.draggable, droppable = $(this),
dragPos = draggable.position(), dropPos = droppable.position();
draggable.css({
left: dropPos.left + 'px',
top: dropPos.top + 'px'
});
droppable.css({
left: dragPos.left + 'px',
top: dragPos.top + 'px'
});
draggable.swap(droppable);
}
});