Skip to content

Commit

Permalink
fix: remove ability to click on sliders tooltip and changing the prog…
Browse files Browse the repository at this point in the history
…ress
  • Loading branch information
victoralvesf committed Oct 4, 2024
1 parent 5fc7c6b commit 7347aec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/ui/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Slider = React.forwardRef<
<SliderPrimitive.Root
ref={ref}
className={cn(
'relative h-1.5 flex w-full touch-none select-none items-center cursor-pointer',
'relative h-3 flex w-full touch-none select-none items-center cursor-pointer',
className,
)}
onContextMenu={handleContextMenu}
Expand Down Expand Up @@ -118,6 +118,9 @@ function SliderTooltip({
'bg-secondary-foreground border-muted-foreground/50 text-secondary font-semibold text-base',
)}
sticky="always"
onClick={(e) => e.stopPropagation()}
onPointerDown={(e) => e.stopPropagation()}
style={{ cursor: 'default' }}
>
<p>{content}</p>
</TooltipContent>
Expand Down

0 comments on commit 7347aec

Please sign in to comment.