Skip to content

Commit

Permalink
Update Label.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitgrelard committed Mar 5, 2024
1 parent 84aab54 commit 1390228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/label/src/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Label = React.forwardRef<LabelElement, LabelProps>((props, forwardedRef) =
onMouseDown={(event) => {
// only prevent text selection if clicking inside the label itself
const target = event.target as HTMLElement;
if (target.closest('input, button')) return;
if (target.closest('input, button, select')) return;

props.onMouseDown?.(event);
// prevent text selection when double clicking label
Expand Down

0 comments on commit 1390228

Please sign in to comment.