Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

html - <select> box not displaying on Android in PhoneGap

I have some HTML code in a PhoneGap application that displays a <select> box to the user. When I tap on it, the usual Android selection screen doesn't pop up. I had a similar problem with this earlier on webOS (although at that time the drop-downs were working properly).

The <select> is inside a <div> that gets hidden or shown at certain times during execution:

<div id="submit">
  <ul class="rounded">
    <li><select id="item"></select></li>
  </ul>
</div>

The problem only occurs when the <div> has been hidden and then shown again (either directly through CSS or by using jQuery's hide() and show() methods. If I move the <select> box outside of that <div>, or if I make the <div> always visible, then the drop-down behaves as it should; no problems.

Why is this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In this case the problem was actually cased by jQTouch. To fix it, just comment out these 4 lines in jqtouch.css

Under "body"

  /*-webkit-perspective: 800;*/
  /*-webkit-transform-style: preserve-3d;*/ 

Under "body > * "

/*-webkit-backface-visibility: hidden;*/
/*-webkit-transform: translate3d(0,0,0) rotate(0) scale(1);*/

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...