android - JQuery mobile text field not loosing focus -


i new jquery mobile , cordova.i created simple cordova application jquery mobile having form simple text-field , radio input.however noticed problem when application run typed in text , click on radio button ,i notices focus still on text input.if jquery mobile not used focus out text input.i know jquery mobile adds default styles these form elements.i don't want focus in text-field when choose select radio button.please me on this.my code html page given below.

<html>     <head>         <title>todo supply title</title>         <meta charset="utf-8">         <meta name="viewport" content="width=device-width, initial-scale=1.0">         <link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet">          <script src="js/jquery-1.11.3.min.js"></script>         <script src="js/jquery.mobile-1.4.5.min.js"></script>     </head>     <body>         <div>                         <form>                 <label for="text-basic">text input:</label>                 <input type="text" name="text-basic" id="text-basic" value="">                                <fieldset data-role="controlgroup">                     <legend>radio buttons, vertical controlgroup:</legend>                     <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked">                     <label for="radio-choice-1">cat</label>                     <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2">                     <label for="radio-choice-2">dog</label>                     <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3">                     <label for="radio-choice-3">hamster</label>                     <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4">                     <label for="radio-choice-4">lizard</label>                 </fieldset>             </form>         </div>     </body> </html> 

the screenshot of mobile view attached below.

enter image description here

here in above image can see android keyboard not closing if select element radio button list.

try

$("input:radio").addeventlistener('touchstart',function(e) {      $('input[type=text], textarea').focusout(); }); 

it manual removes focus textarea or textinput when input type radio touched .

or try

$("input:radio").addeventlistener('touchstart',function(e) {      $(':focus').blur(); }); 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -