triceam / app-UI

app-UI is a collection of user interface components that may be helpful to web and mobile developers for creating interactive applications using HTML and JavaScript, especially those targeting mobile devices. app-UI is a continual work in progress - it was born out of the necessity to have rich & native-feeling interfaces in HTML/JS experiences, and it works great with PhoneGap applications (http://www.phonegap.com). app-UI can easily be styled/customized using CSS.
http://triceam.github.com/app-UI/
Other
1.27k stars 239 forks source link

select got from Ajax not working in Android 2.3.x #51

Open totorche opened 10 years ago

totorche commented 10 years ago

Hi, I wrote an app for iOS and Android with App-ui. Everything's working well in iOS and Android ICS, but in Gingerbread, when I get select inputs from an Ajax request, the select won't open. If I rote the phone, it's working well again. But before it doesn't work. The select which are set without Ajax (directly in the code) are working well.

It's been a week I'm looking for a solution.

Thanks a lot in advance.

totorche commented 10 years ago

If I catch the events ontouchend and onclick, for a select without ajax there's just the ontouchend. For a select got from Ajax, there're both of them (ontouchend and then onclick) and the select doesn't open.

triceam commented 10 years ago

Any code snippets you can share? I have not seen this issue. My guess is that it is related to hardware acceleration/CSS styles, which often have issues on Android. See if adding/removing the following css on those elements helps: backface-visibility:hidden; -webkit-backface-visibility:hidden;

Also, try removing all instances of -webkit-transform: translate3d(0, 0, 0); from your CSS - this is known to cause issues on older versions of android

totorche commented 10 years ago

I already tried with removing every instance of -webkit-transform: translate3d(0, 0, 0); from the CSS. It helped for the selects which were put directly in the begining of the app, but the one got from Ajax still didn't work.

I switched to another plugin since my last post and now my app work perfectly ;-)

I'll try anyway with "backface-visibility" in a few days on the version with app-UI and come back to you.

Thanks for your time.