0

当使用 jquery ui 可排序小部件并将项目向下拖动到浏览器中的可见区域下方时,窗口不会滚动,因此您可以将其拖放到其他项目可能所在的区域下方。我无法为 Firefox 找到答案 - 我已经看到了 Chrome 的一种解决方法,您可以在其中向可排序函数添加一个辅助属性,该函数执行以下操作:

helper: function (event, element) {
   return element.clone().appendTo('body');
}

...但同样,这只修复了 Chrome 中的相同问题,而不是 Firefox。

4

1 回答 1

0

尝试这样的事情

helper: function(){
    $('yourScrollableContainer').append('<div id="clone">' + $(this).html() + '</div>');
    $("#clone").hide();
    setTimeout(function(){
        $('#clone').appendTo('body');
        $("#clone").show();
    },1);
    return $("#clone");
}

您可以参考thisthis question以获得更多帮助。

于 2013-04-08T07:18:17.230 回答