diff --git a/components/ui/toast.tsx b/components/ui/toast.tsx index de90680..bdfbb62 100644 --- a/components/ui/toast.tsx +++ b/components/ui/toast.tsx @@ -44,11 +44,19 @@ const Toast = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & VariantProps ->(({ className, variant, ...props }, ref) => { +>(({ className, variant, onPointerDown, onMouseDown, ...props }, ref) => { return ( { + e.stopPropagation() + onPointerDown?.(e) + }} + onMouseDown={(e) => { + e.stopPropagation() + onMouseDown?.(e) + }} {...props} /> ) @@ -82,9 +90,17 @@ const ToastClose = React.forwardRef< )} toast-close="" onClick={(e) => { + e.preventDefault() e.stopPropagation() + e.nativeEvent.stopImmediatePropagation() onClick?.(e) }} + onPointerDown={(e) => { + e.stopPropagation() + }} + onMouseDown={(e) => { + e.stopPropagation() + }} {...props} >