Skip to content

Commit 719ed64

Browse files
authored
[WelcomeUI] Fix checkbox wrapper click handling (#39422)
1 parent c510b7c commit 719ed64

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

browser/resources/brave_welcome_page/components/product_card.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ export function ProductCard(props: Props) {
2525
<div
2626
data-css-scope={style.scope}
2727
className={props.checked ? undefined : 'unchecked'}
28-
onClick={() => props.onChange(!props.checked)}
28+
onClick={(event) => {
29+
if (
30+
event.target instanceof Element
31+
&& event.target.closest('leo-checkbox')
32+
) {
33+
return
34+
}
35+
props.onChange(!props.checked)
36+
}}
2937
>
3038
<img src={props.image} />
3139
<div className='text'>

0 commit comments

Comments
 (0)