我有一个cytoscape.js图,在每个节点中我添加了一个tippy.js工具提示。在工具提示中,我有一个带有文本输入的表单。一切看起来都很好,但工具提示中的文本输入和按钮不活动。
我已经改变了div的z-index,所以应该在cytoscape画布上。仍然没有成功。
var makeTippy = function (node, text) {
return tippy(node.popperRef(), {
content: function () {
var div = document.createElement('div');
div.innerHTML = '<form name="input" >' +
'For : '+ node._private.data.name+'<br>'+
'Value :<br>'+
'<input type="text" name="value"><br>' +
'<input type="submit" value="Submit" />' +
'</form>';
div.style.width = "100px";
div.style.height = "120px";
//div.style.background = "black";
div.style.color = "white";
div.style.position= "relative";
div.style.zIndex = "1500";
return div;
},
trigger: 'manual',
arrow: true,
placement: 'bottom',
hideOnClick: false,
multiple: true,
followCursor: true,
theme: 'run',
sticky: true
});
};
最后,它通过将tippy实例的interactive设置为true来工作:
互动:真的,