Skip to content

Commit

Permalink
uberf-5551: configurable click propagation from edit box (#4674)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
  • Loading branch information
lexiv0re authored Feb 16, 2024
1 parent 0ad132e commit b3ae99c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/ui/src/components/EditBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit b3ae99c

Please sign in to comment.