ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Only checkbox icon is tappable, not whole row

Open lwenke opened this issue 12 years ago • 7 comments

Type: bug

Platform: desktop browser

false

This problem happens on all platforms.

For the ionic radio controls, when any area in a row is tapped, the radio is selected. The same should happen with checkboxes. At the moment you need to tap the precise location of the checkbox icon to toggle it. Tapping the text next to the checkbox doesn't do anything.

In the css example the text is not inside the label:

http://ionicframework.com/docs/components/#checkbox

But if it is, the text is tappable (though not the area to its right) but the control doesn't look good due to a lacking of css styling.

See the second group of checkboxes:

http://codepen.io/zephyr103/pen/fAzqC/

ion-checkboxes have the text wrapped inside of their tags, but like the example checkboxes the text isn't tappable....

See the third group of checkboxes in the previous codepen

Possible fix: .item.item-checkbox label { width: 100%; }

http://codepen.io/zephyr103/pen/CyHhG/

lwenke avatar Mar 31 '14 17:03 lwenke

Fixed with .item-checkbox label.checkbox { width: 100%; } - don't think it would have any bad side effects. @adamdbradley ?

ajoslin avatar Mar 31 '14 17:03 ajoslin

BTW the text isn't inside the label in the CSS docs for checkboxes.... even though with that fix it still works ok.

lwenke avatar Mar 31 '14 17:03 lwenke

If I recall we did this on purpose, but that said I'm not opposed to having the whole row being able to check the box. @bensperry whatchathink?

adamdbradley avatar Mar 31 '14 17:03 adamdbradley

labels usually always have text in them - though sometimes the control isn't inside them (in that case they use "for" and "id")

lwenke avatar Mar 31 '14 17:03 lwenke

Let's just make it the whole row then

bensperry avatar Mar 31 '14 17:03 bensperry

:+1:

adamdbradley avatar Mar 31 '14 17:03 adamdbradley

Hello Sir, How to get checkbox value and icon both are in another page

gaurangvyas avatar Aug 20 '15 07:08 gaurangvyas