-2

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!

crollywood
  • 31
  • 5
  • 2
    So, how can we debug your code if we can't see it? – Cerbrus Oct 13 '14 at 13:40
  • @Cerbrus That's a good point, and i thought about it how to make test example and cant think of a way to make jsfiddle with custom user agent string for you to test it – crollywood Oct 14 '14 at 07:15
  • Some browsers can spoof user agents. We just need your code and the "broken" ua's – Cerbrus Oct 14 '14 at 07:24

1 Answers1

0

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

crollywood
  • 31
  • 5