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

fix(Checkbox): preventDefault() in mouseDown should prevent focus #3732

Merged
merged 1 commit into from
Aug 4, 2019

Conversation

layershifter
Copy link
Member

Fixes #3402.

Checkbox component should behave as native input[type=checkbox]. preventDefault() in onMouseDown should prevent Checkbox from focusing:

With changes in this PR, the code below now works properly:

<Checkbox onMouseDown={(e) => e.preventDefault()} />

@codecov-io
Copy link

codecov-io commented Aug 4, 2019

Codecov Report

Merging #3732 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3732      +/-   ##
==========================================
+ Coverage   99.83%   99.83%   +<.01%     
==========================================
  Files         175      175              
  Lines        3121     3122       +1     
==========================================
+ Hits         3116     3117       +1     
  Misses          5        5
Impacted Files Coverage Δ
src/modules/Checkbox/Checkbox.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2193182...49e9c24. Read the comment docs.

@layershifter layershifter merged commit f50550c into master Aug 4, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/checkbox-handle-prevent-default branch August 4, 2019 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkbox: no way to prevent to be focused
2 participants