Javascript jsTree拖放并不总是有效的

Javascript jsTree拖放并不总是有效的,javascript,Javascript,将节点拖动到新位置并不总是保持不变。 我的代码是 $("#product-category-tree").jstree({ "plugins":["themes", "html_data", "dnd"], "themes":{ "icons": false, "dots": false } }).bind("move_node.jstree", function(e , data)

将节点拖动到新位置并不总是保持不变。 我的代码是

    $("#product-category-tree").jstree({
        "plugins":["themes", "html_data", "dnd"], 
        "themes":{
            "icons": false,
            "dots": false
        }
    }).bind("move_node.jstree", function(e , data){
        data.rslt.o.each(
            function(i){
                $.ajax({
                    type: 'PUT',
                    url: '/product_categories/move',
                    data: {
                        "operation" : "move_node",
                        'drag_id' : $(this).data("id"),
                        'drop_id' : data.rslt.np.data("id"),
                        'index' : data.rslt.cp + i
                    },
                    success: function(r){
                        if (r != 'success'){
                            alert(r);
                            $.jstree.rollback(data.rlbk);
                        }
                    }
                });
            }
        )
    })
项目的GitHub页面上有一个未解决的问题()。你可以在那里找到很多解决办法

我用过这个,它是侵入性最小的,但仅限于现代浏览器:

#jstree-marker-line {
    pointer-events: none;
}