Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select box will not allow a selection UIWebView iOS9

I have a simple web page application that is acting weird with IOS9. The application uses UIWebview To access my website. I have series of webpages that have selection boxes, and when a selection is made, a little javascript will trigger and go to the next page. My Iphone users who have updated to ios9, are no longer able to select anything from the selection wheel. I was wonder if there is there is something I could change in html or Javascript to keep me from having to do entire application update. My webpage is below.

<?
 include("conn.php");
 include("pl_header.php");

//// Get Block Areas

$sql="SELECT DISTINCT area FROM platform_locations";
$result=mysql_query($sql);

$options="";

while ($row=mysql_fetch_array($result)) {

    $area=$row["area"];

$options.="<OPTION VALUE=\"search_step_2.php?area=$area\">".$area.'</option>';
}
?>



<h3>Step 1<br><br>Choose an Area</h3><br><br>

<form name=form1>

<select name="URL" onchange="$('#myLoadingPicture').show(); window.location.href=this.form.URL.options[this.form.URL.selectedIndex].value"    onfocus="javascript:toggle();" class="select">
    <option value="" disabled="disabled" selected="selected">Click Here To Select</option>
    <?=$options?>
    </SELECT>
<br><br><br><br>

<center>
<a href="map_search1.php" class="small_button">More Search Options</a></center><br>

</form>
</div>
</body>
</html>
like image 275
Justin Petty Avatar asked Oct 11 '15 18:10

Justin Petty


1 Answers

The bug is only present inside UIwebview, on an iphone, using IOS 9.x. It's ok on safari, and on ipad. It's not a jquery or event handler issue.
It's a native select html tag issue.
We try to find a solution without recompile/submit our app to the store...
We have the bug when using the following very basic sample.

<html>
 <head>
  <title>test ios9 bug</title>
 </head>
 <body>
  <div>
  <select>
   <option>opt1</option>
   <option>opt2</option>
   <option selected="selected">opt3</option>
   <option>opt4</option>
   <option>opt5</option>
  </select>
  </div>
 </body>
</html>
like image 63
foxontherock Avatar answered Sep 19 '22 17:09

foxontherock