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

Shift click with custom checkboxes #16

Closed
rbague opened this issue May 24, 2020 · 2 comments · Fixed by #18
Closed

Shift click with custom checkboxes #16

rbague opened this issue May 24, 2020 · 2 comments · Fixed by #18
Assignees

Comments

@rbague
Copy link

rbague commented May 24, 2020

I just set up this library with bootstrap custom checkboxes, and everything works fine except the shift click functionality.
After investigating this is probably because onMouseDown checks that the event target has the data-check-all-item attribute, which is not the case as bootstrap hides the input and displays the checkbox in the label's :before and :after pseude-elements, causing the event.target to be the label, which does not have the attribute.

It might happen the same with other CSS libraries that use a similiar approach to change the checkbox design like Semantic UI or iCheck.

I don't know if there is an easy fix or of it is worth it, but in that case it might be required to explain it in the README.

Here is a simple example so you can see the behaviour I'm describing: https://codesandbox.io/s/githubcheck-all-bootstrap-custom-checkboxes-76jv5

@muan
Copy link
Contributor

muan commented May 27, 2020

Thanks for the report. With 0.4.0 this should be fixed. See #18 for the issues around text selection & firefox though.

@rbague
Copy link
Author

rbague commented May 29, 2020

Awesome, thanks!

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

Successfully merging a pull request may close this issue.

2 participants