Fix disabled git action tooltip hover handling

- Use the quick action button itself as the popover trigger
- Keep hover tooltips working on disabled controls via pointer-events override
- Remove focus/blur tab-stop handlers from disabled tooltip wrappers
This commit is contained in:
Julius Marminge committed 2026-02-14 22:38:54 -08:00
1 parent c129be5e21
commit beb9201f5d
1 file changed
+7 -18
+7 -18
View File
@@ -459,26 +459,18 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
<Popover open={isQuickActionPopoverOpen} onOpenChange={setIsQuickActionPopoverOpen}>
<PopoverTrigger
render={
<span
className="inline-flex cursor-not-allowed"
onBlur={() => setIsQuickActionPopoverOpen(false)}
onFocus={() => setIsQuickActionPopoverOpen(true)}
<Button
variant="outline"
size="xs"
disabled={isGitActionRunning || quickAction.disabled}
className="cursor-not-allowed disabled:cursor-not-allowed disabled:pointer-events-auto"
onMouseEnter={() => setIsQuickActionPopoverOpen(true)}
onMouseLeave={() => setIsQuickActionPopoverOpen(false)}
tabIndex={0}
/>
}
>
<Button
variant="outline"
size="xs"
disabled={isGitActionRunning || quickAction.disabled}
className="cursor-not-allowed disabled:cursor-not-allowed"
onClick={runQuickAction}
>
<GitQuickActionIcon quickAction={quickAction} />
{quickAction.label}
</Button>
<GitQuickActionIcon quickAction={quickAction} />
{quickAction.label}
</PopoverTrigger>
<PopoverPopup tooltipStyle side="bottom" align="start">
{quickActionDisabledReason}
@@ -522,11 +514,8 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
render={
<span
className="inline-flex w-full cursor-not-allowed"
onBlur={() => setOpenDisabledMenuItemId(null)}
onFocus={() => setOpenDisabledMenuItemId(item.id)}
onMouseEnter={() => setOpenDisabledMenuItemId(item.id)}
onMouseLeave={() => setOpenDisabledMenuItemId(null)}
tabIndex={0}
/>
}
>