Skip to content

Commit

Permalink
fix: button "close" click event targeting the icon instead of the ent…
Browse files Browse the repository at this point in the history
…ire container

This issue caused the tab to close only when clicking specifically on the icon, even though the hover effect suggested that the entire container was clickable.
  • Loading branch information
rentalhost committed Aug 14, 2024
1 parent 07ebd05 commit bfb79d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/gui/sortable-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export const WindowTabItemButton = forwardRef<
"rounded-full hover:bg-red-600 hover:text-white w-4 h-4 ml-2 flex justify-center items-center",
"libsql-window-close"
)}
onClick={(e) => {
e.stopPropagation();
if (onClose) onClose();
}}
>
<LucideX
className={cn("w-3 h-3 grow-0 shrink-0", "libsql-window-close")}
onClick={(e) => {
e.stopPropagation();
if (onClose) onClose();
}}
/>
</div>
)}
Expand Down

0 comments on commit bfb79d9

Please sign in to comment.