mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 01:09:46 +00:00
hotfix: Stop clicks on the textarea from propagating to the node itself (#6788)
## Summary Selecting text shouldn't drag the node. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6788-hotfix-Stop-clicks-on-the-textarea-from-propagating-to-the-node-itself-2b16d73d3650819c8d0dc427d5758580) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -65,7 +65,9 @@ export class VueNodeHelpers {
|
|||||||
* Select a specific Vue node by ID
|
* Select a specific Vue node by ID
|
||||||
*/
|
*/
|
||||||
async selectNode(nodeId: string): Promise<void> {
|
async selectNode(nodeId: string): Promise<void> {
|
||||||
await this.page.locator(`[data-node-id="${nodeId}"]`).click()
|
await this.page
|
||||||
|
.locator(`[data-node-id="${nodeId}"] .lg-node-header`)
|
||||||
|
.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,11 +79,13 @@ export class VueNodeHelpers {
|
|||||||
// Select first node normally
|
// Select first node normally
|
||||||
await this.selectNode(nodeIds[0])
|
await this.selectNode(nodeIds[0])
|
||||||
|
|
||||||
// Add additional nodes with Ctrl+click
|
// Add additional nodes with Ctrl+click on header
|
||||||
for (let i = 1; i < nodeIds.length; i++) {
|
for (let i = 1; i < nodeIds.length; i++) {
|
||||||
await this.page.locator(`[data-node-id="${nodeIds[i]}"]`).click({
|
await this.page
|
||||||
modifiers: ['Control']
|
.locator(`[data-node-id="${nodeIds[i]}"] .lg-node-header`)
|
||||||
})
|
.click({
|
||||||
|
modifiers: ['Control']
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
:disabled="widget.options?.read_only"
|
:disabled="widget.options?.read_only"
|
||||||
fluid
|
fluid
|
||||||
data-capture-wheel="true"
|
data-capture-wheel="true"
|
||||||
|
@pointerdown.capture.stop
|
||||||
/>
|
/>
|
||||||
<LODFallback />
|
<LODFallback />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user