fix: button inside tooltip is triggered twice

This commit is contained in:
Shariq Ansari 2025-03-22 14:37:37 +05:30
parent 72e499e845
commit ff52cf33d1
6 changed files with 128 additions and 105 deletions

View File

@ -43,6 +43,7 @@
attachment.is_private ? __('Make public') : __('Make private')
"
>
<div>
<Button
class="!size-5"
@click.stop="
@ -54,14 +55,17 @@
class="size-3 text-ink-gray-7"
/>
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Delete attachment')">
<div>
<Button
class="!size-5"
@click.stop="() => deleteAttachment(attachment.name)"
>
<FeatherIcon name="trash-2" class="size-3 text-ink-gray-7" />
</Button>
</div>
</Tooltip>
</div>
</div>

View File

@ -42,9 +42,11 @@
@click.stop
>
<Tooltip :text="__('Change Status')">
<div>
<Button variant="ghosted" class="hover:bg-surface-gray-4">
<TaskStatusIcon :status="task.status" />
</Button>
</div>
</Tooltip>
</Dropdown>
<Dropdown

View File

@ -52,10 +52,8 @@
v-for="assignee in assignees"
:key="assignee.name"
>
<Button
:label="getUser(assignee.name).full_name"
theme="gray"
>
<div>
<Button :label="getUser(assignee.name).full_name" theme="gray">
<template #prefix>
<UserAvatar :user="assignee.name" size="sm" />
</template>
@ -68,6 +66,7 @@
/>
</template>
</Button>
</div>
</Tooltip>
</div>
<ErrorMessage class="mt-2" v-if="error" :message="__(error)" />

View File

@ -51,6 +51,7 @@
</div>
<div>
<Tooltip text="Delete Invitation">
<div>
<Button
icon="x"
variant="ghost"
@ -60,6 +61,7 @@
"
@click="pendingInvitations.delete.submit(user.name)"
/>
</div>
</Tooltip>
</div>
</li>

View File

@ -75,11 +75,14 @@
</Tooltip>
<div class="flex gap-1.5">
<Tooltip v-if="callEnabled" :text="__('Make a call')">
<div>
<Button class="h-7 w-7" @click="triggerCall">
<PhoneIcon class="h-4 w-4" />
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Send an email')">
<div>
<Button class="h-7 w-7">
<Email2Icon
class="h-4 w-4"
@ -90,8 +93,10 @@
"
/>
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Go to website')">
<div>
<Button class="h-7 w-7">
<LinkIcon
class="h-4 w-4"
@ -102,11 +107,14 @@
"
/>
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Attach a file')">
<div>
<Button class="size-7" @click="showFilesUploader = true">
<AttachmentIcon class="size-4" />
</Button>
</div>
</Tooltip>
</div>
</div>

View File

@ -117,6 +117,7 @@
</Tooltip>
<div class="flex gap-1.5">
<Tooltip v-if="callEnabled" :text="__('Make a call')">
<div>
<Button
class="h-7 w-7"
@click="
@ -128,8 +129,10 @@
>
<PhoneIcon class="h-4 w-4" />
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Send an email')">
<div>
<Button class="h-7 w-7">
<Email2Icon
class="h-4 w-4"
@ -140,8 +143,10 @@
"
/>
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Go to website')">
<div>
<Button class="h-7 w-7">
<LinkIcon
class="h-4 w-4"
@ -152,11 +157,14 @@
"
/>
</Button>
</div>
</Tooltip>
<Tooltip :text="__('Attach a file')">
<div>
<Button class="h-7 w-7" @click="showFilesUploader = true">
<AttachmentIcon class="h-4 w-4" />
</Button>
</div>
</Tooltip>
</div>
<ErrorMessage :message="__(error)" />