gal*_*tia 4 html forms tooltip cytoscape.js
我有一个 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
});
};
Run Code Online (Sandbox Code Playgroud)