Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox: no longer prevents default after updating to version 0.85.0 #3440

Closed
hasen011 opened this issue Feb 14, 2019 · 2 comments
Closed
Labels

Comments

@hasen011
Copy link

hasen011 commented Feb 14, 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!

@welcome
Copy link

welcome bot commented Feb 14, 2019

👋 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 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
@layershifter
Copy link
Member

Was fixed in #3435, the issue in 0.85.0 comes from #3351. We used there an event from mouseup instead onclick, it cause the described issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants