From b3ae99c5379688f06c25ef61461e4252b38e79b6 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Sat, 17 Feb 2024 02:25:05 +0700 Subject: [PATCH] uberf-5551: configurable click propagation from edit box (#4674) Signed-off-by: Alexey Zinoviev --- packages/ui/src/components/EditBox.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index 02cb92ba20e..7e1bc35b2d3 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -41,6 +41,7 @@ export let fullSize: boolean = false export let required: boolean = false export let uppercase: boolean = false + export let propagateClick: boolean = false const dispatch = createEventDispatcher() @@ -147,7 +148,11 @@ class:flex-grow={fullSize} class:w-full={focusable || fullSize} class:uppercase - on:click|stopPropagation={() => { + on:click={(event) => { + if (!propagateClick) { + event.stopPropagation() + } + input.focus() }} use:resizeObserver={(element) => {