javascripthtmluser-agentphonegap-buildnexus-4

onclick in html not working in ios 7_0 user agent


I am making mobile application using phonegap build service. I've tested application on several tablets and smart phones and it is working well on every device except on Nexus 4 (android 4.4). On Nexus it doesn't call function specified in any onclick attribute written in html. My guess was that it had to do something with user agent string, so I've tried it in google chrome emulator using:

Mozilla/5.0 (Linux; Android 4.4; Nexus 4 Build/KRT16E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari

found on http://user-agent-string.info/list-of-ua/os-detail?os=Android+4.4+KitKat .

I wasn't able to replicate the issue but I did find it again using user-agent-string from iPhone 5:

Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53

I tried googling and didn't find anyone with similar problem...

Anyone has any ideas what could it be?

Thanks in advance!


Solution

  • Ok, thanks to @Cerbrus, I wanted to make a test example for you guys to try. As I was unable to reproduce bug on simple html structure, i figured it had to do something with some of the libs I'm using. Turns out the problem was in iScroll lib, and after adding

    tap: true
    

    among other options, IT WORKED! Not sure why exactly did it happen but if someone has similar problem, add tap in options (NOT CLICK, as it wont work for android versions older than 4.4.4).

    Thanks again