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

Unclickable gap between mdc-checkbox and label (mdc-form-field) #371

Closed
anton-kachurin opened this issue Mar 1, 2017 · 1 comment · Fixed by #373
Closed

Unclickable gap between mdc-checkbox and label (mdc-form-field) #371

anton-kachurin opened this issue Mar 1, 2017 · 1 comment · Fixed by #373

Comments

@anton-kachurin
Copy link
Contributor

What MDC-Web Version are you using?

0.5.0

What browser(s) is this bug affecting?

Chrome, Firefox

What OS are you using?

Windows 10

What are the steps to reproduce the bug?

  1. go to http://material-components-web.appspot.com/checkbox.html
  2. click in between any checkbox and its label a few times
  3. note that there is a 4px-wide gap between these elements clicking on which doesn't change the state of the checkbox

What is the expected behavior?

The space between mdc-checkbox and label (wrapped in mdc-form-field) must be clickable on all its width.

Any other information you believe would be useful?

The same applies to mdc-radio.
Buggy behavior is caused by the margin set to the label element. Maybe using padding instead will solve it.

@traviskaufman
Copy link
Contributor

It makes sense that the checkbox and label area should be entirely clickable.

In order to fix this we need to change mdc-form-field from using margin-left (margin-right for RTL) to padding-left (padding-right). Note that the auto margin values should stay the same to preserve flexbox behavior.

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

Successfully merging a pull request may close this issue.

2 participants