IonDen / ion.checkRadio

jQuery plugin for styling checkboxes and radio-buttons
69 stars 20 forks source link

Element will get or lose focus #15

Closed pranavgore09 closed 9 years ago

pranavgore09 commented 9 years ago

When element is selected it will get focus and when deselected focus will be lost.

IonDen commented 9 years ago

Hi, sorry, but focus is only for navigating through tab or arrows buttons on keyboard. Am i wrong?

pranavgore09 commented 9 years ago

Hi, Thank you for consideration. I would like to explain the scenario where that change will make sense (It will not affect desktop browsers much and it is not about navigation).

We are using ionCheckRadio.js in a web view on android phones where screen is considerably small. Consider I have a form with text fields and some radio buttons.

  1. When user taps on a text field android brings up the keyboard because user wants to type in something.
  2. Now, when user selects any radio button, keyboard is still up because focus was not changed from text box to selected radio button. Same thing with check boxes. On small screen devices it makes big difference.

So there will be a case where user do not need the keyboard but still it is up only because our library does not focused the selected element(that looks bad).

If we do not add this focus to the element, there will be a situation when I check my element immediately after clicking it -

Thanking you for creating this library, it is very great.

IonDen commented 9 years ago

Ok, i will add this. But in new 2.0 version (coming soon).

pranavgore09 commented 9 years ago

Great, thank you.

IonDen commented 9 years ago

Should be ok in 2.0.0