You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we are using a Card component with a toggle Checkbox in its header. The Card component is also used as a link (from react-router-dom), so we need to prevent the link from firing when we click the toggle. Everything was working fine until we updated to version 0.85.0 from 0.83.0.
Steps
Use a card component (as a link) with a checkbox in it and try preventing default when you click the checkbox to prevent the link from firing.
Expected Result
Checkbox is checked without being redirected to the link.
Actual Result
Prevent default doesn't work anymore so you are redirected to the link.
I created an example without a link which uses stopPropagation instead but the described behavior can still be observed if switched between the two versions. I wonder if this could be caused by this PR: #3351
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
layershifter
changed the title
Checkbox no longer prevents default after updating to version 0.85.0
Checkbox: no longer prevents default after updating to version 0.85.0
Feb 21, 2019
Bug Report
Hi, we are using a Card component with a toggle Checkbox in its header. The Card component is also used as a link (from react-router-dom), so we need to prevent the link from firing when we click the toggle. Everything was working fine until we updated to version 0.85.0 from 0.83.0.
Steps
Use a card component (as a link) with a checkbox in it and try preventing default when you click the checkbox to prevent the link from firing.
Expected Result
Checkbox is checked without being redirected to the link.
Actual Result
Prevent default doesn't work anymore so you are redirected to the link.
Version
"semantic-ui": "^2.4.2"
"semantic-ui-react": "^0.85.0"
Testcase
I created an example without a link which uses stopPropagation instead but the described behavior can still be observed if switched between the two versions. I wonder if this could be caused by this PR: #3351
https://codesandbox.io/s/0oxky24lyp
EDIT: Here is an example with a link: https://codesandbox.io/s/2zxzr1jw5p
Thanks for any help!
The text was updated successfully, but these errors were encountered: