fix: prevent keypress events from bubbling in decision tree drawer (#5993)
Fixes #5991 - Add keydown event handlers with stopPropagation() to prevent SvelteFlow from receiving keypress events from text inputs in decision tree config - Applied at individual input level (summary field) and container level (configuration panel) to catch all input types - Prevents accidental node deletion when typing in configuration inputs Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,13 @@
|
||||
</div>
|
||||
</Pane>
|
||||
<Pane size={40}>
|
||||
<div class="h-full w-full bg-surface p-4 flex flex-col gap-6">
|
||||
<div
|
||||
class="h-full w-full bg-surface p-4 flex flex-col gap-6"
|
||||
on:keydown={(e) => {
|
||||
// Prevent keyboard events from bubbling to SvelteFlow
|
||||
e.stopPropagation()
|
||||
}}
|
||||
>
|
||||
{#if selectedNode}
|
||||
<Section label="Conditions" class="w-full flex flex-col gap-2">
|
||||
<svelte:fragment slot="action">
|
||||
@@ -92,6 +98,10 @@
|
||||
renderCount++
|
||||
}, 300)()
|
||||
}}
|
||||
on:keydown={(e) => {
|
||||
// Prevent keyboard events from bubbling to SvelteFlow
|
||||
e.stopPropagation()
|
||||
}}
|
||||
/>
|
||||
</Label>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user