Skip to content

Commit dd97236

Browse files
DrJKLgithub-actions[bot]
authored andcommitted
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)
1 parent e94a74f commit dd97236

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

browser_tests/fixtures/VueNodeHelpers.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export class VueNodeHelpers {
6565
* Select a specific Vue node by ID
6666
*/
6767
async selectNode(nodeId: string): Promise<void> {
68-
await this.page.locator(`[data-node-id="${nodeId}"]`).click()
68+
await this.page
69+
.locator(`[data-node-id="${nodeId}"] .lg-node-header`)
70+
.click()
6971
}
7072

7173
/**
@@ -77,11 +79,13 @@ export class VueNodeHelpers {
7779
// Select first node normally
7880
await this.selectNode(nodeIds[0])
7981

80-
// Add additional nodes with Ctrl+click
82+
// Add additional nodes with Ctrl+click on header
8183
for (let i = 1; i < nodeIds.length; i++) {
82-
await this.page.locator(`[data-node-id="${nodeIds[i]}"]`).click({
83-
modifiers: ['Control']
84-
})
84+
await this.page
85+
.locator(`[data-node-id="${nodeIds[i]}"] .lg-node-header`)
86+
.click({
87+
modifiers: ['Control']
88+
})
8589
}
8690
}
8791

src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
:disabled="widget.options?.read_only"
1313
fluid
1414
data-capture-wheel="true"
15+
@pointerdown.capture.stop
1516
/>
1617
<LODFallback />
1718
</div>

0 commit comments

Comments
 (0)