From 337700cfa700744cd6869bdaf079e191727a0f4c Mon Sep 17 00:00:00 2001 From: Timi Date: Mon, 3 Aug 2026 17:27:49 +0800 Subject: [PATCH] fix event bubble --- src/components/TelephoneLink.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/TelephoneLink.vue b/src/components/TelephoneLink.vue index 817f021..2f6b93f 100644 --- a/src/components/TelephoneLink.vue +++ b/src/components/TelephoneLink.vue @@ -5,7 +5,7 @@ :href="href || undefined" class="telephone-link" :class="{ clickable: !!href }" - @click.stop + @click="handleClick" > @@ -28,6 +28,12 @@ const props = withDefaults(defineProps<{ const textValue = computed(() => props.value?.trim() || ""); const displayText = computed(() => textValue.value || props.placeholder); const href = computed(() => canDialTelephone(textValue.value) ? buildTelephoneURL(textValue.value) : ""); + +function handleClick(event: MouseEvent): void { + if (textValue.value) { + event.stopPropagation(); + } +}