diff --git a/src/components/graph/NodeTitleEditor.vue b/src/components/graph/NodeTitleEditor.vue index 322abac2c..d369addc6 100644 --- a/src/components/graph/NodeTitleEditor.vue +++ b/src/components/graph/NodeTitleEditor.vue @@ -54,9 +54,12 @@ const extension: ComfyExtension = { editedTitle.value = this.title showInput.value = true + const isCollapsed = node.flags?.collapsed const [x1, y1, x2, y2] = this.getBounding() const [nodeWidth, nodeHeight] = this.size - const canvasWidth = nodeWidth + const canvasWidth = + // @ts-expect-error Remove after collapsed_width is exposed in LiteGraph + isCollapsed && node._collapsed_width ? node._collapsed_width : nodeWidth const canvasHeight = LiteGraph.NODE_TITLE_HEIGHT const [left, top] = app.canvasPosToClientPos([x1, y1])