Hide tooltip when clicking (e.g. combo widget)

This commit is contained in:
pythongosssss 2024-07-14 09:34:38 +01:00
parent 0d77f71929
commit 3b83253e04

View File

@ -102,8 +102,10 @@ app.registerExtension({
onChange(value) { onChange(value) {
if (value) { if (value) {
LiteGraph.pointerListenerAdd(app.canvasEl, "move", onCanvasPointerMove); LiteGraph.pointerListenerAdd(app.canvasEl, "move", onCanvasPointerMove);
window.addEventListener("click", hideTooltip);
} else { } else {
LiteGraph.pointerListenerRemove(app.canvasEl, "move", onCanvasPointerMove); LiteGraph.pointerListenerRemove(app.canvasEl, "move", onCanvasPointerMove);
window.removeEventListener("click", hideTooltip);
} }
}, },
}); });