2015-11-17 38 views
1

我使用ngJsTree directive代替jsTreeContextmenu插件不能在模態中工作。 Bug in jsTree?

我有麻煩在模態中使用它。 我爲ngJsTree創建了issue。 但我不知道,如何在沒有角度指令的情況下重現這一點(沒有角度沒有技巧)。

enter image description here

它的屏幕,鼠標右鍵不起作用,如預期

UPDATE

我轉載此爲jsTree(plunker)。 一段代碼:

$(function() { 
    // 6 create an instance when the DOM is ready 
    $('#jstree').jstree({ 
     "checkbox": { 
      real_checkboxes: true, 
      real_checkboxes_names: function (n) { 
       var nid = 0; 
       $(n).each(function (data) { 
        nid = $(this).attr("nodeid"); 
       }); 
       return (["check_" + nid, nid]); 
      }, 
      two_state: true 
     }, 
     "plugins": ["themes", "json_data", "ui", "checkbox", "contextmenu"] 
    }); 
    // 7 bind to events triggered on the tree 
    $('#jstree').on("changed.jstree", function (e, data) { 
     console.log(data.selected); 
    }); 
    // 8 interact with the tree - either way is OK 
    $('#jstreedemobutton').on('click', function() { 
     $('#jstree').jstree(true).select_node('child_node_1'); 
     $('#jstree').jstree('select_node', 'child_node_1'); 
     $.jstree.reference('#jstree').select_node('child_node_1'); 
    }); 
}); 

上下文菜單模式不滿。

回答

1

你應該在你的CSS中添加以下規則: .vakata-context { z-index: 1100 }

+1

更新了plunker:http://plnkr.co/edit/ez5nmBDqfgQ3uIViKPkH?p=preview –