Skip to content

Commit 449f50d

Browse files
bmarteljuliosgarbi
authored andcommitted
fix: OPTIC-885: Links not clickable from within Radio Button (#6097)
* fix: OPTIC-885: Links not clickable from within Radio Button * add a comment stating this fix needs to be revisited
1 parent 97b1f69 commit 449f50d

File tree

1 file changed

+3
-0
lines changed
  • web/apps/labelstudio/src/components/Form/Elements/RadioGroup

1 file changed

+3
-0
lines changed

web/apps/labelstudio/src/components/Form/Elements/RadioGroup/RadioGroup.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ const RadioButton = ({ value, disabled, children, label, description, ...props }
7474

7575
const clickHandler = useCallback(
7676
(e) => {
77+
// TODO: Find a better way to prevent the click event from being triggered by the child element
78+
// that works beyond just the anchor tag. Otherwise there will be problems with other components/elements.
79+
if (e.target.tagName === "A") return;
7780
e.preventDefault();
7881
e.stopPropagation();
7982
if (disabled) return;

0 commit comments

Comments
 (0)