0

In ICS webview (which is compatible with older versions like 2.3.3) I am loading html file and wrote some functions which are linked with touch events like touchmove and touchend in javascript. But the problem in ICS is clicks on device is not recognized some times and no error in logcat even, can someone has work around for this problem? Thanks in advance.

TZHX
  • 5,291
  • 15
  • 47
  • 56

1 Answers1

2

It could be your device treat them as mouseevents. (sucks...)

I am facing a similar problem. I am not sure if it's the problem of my tablet or it's a general problem for ICS default browser/webview.

Test the following thing.

  1. Write the html/js without jquery/plugin:
    • bind some functions to mouseevents (mousedown/mousemove/mouseup) and touchevents (touchstart/touchmove/touchend/touchcancel) to trace them
    • So, you can trace if you mousedown/mousemove/mouseup/touchstart/touchmove/touchend the webpage
    • upload the webpage to the web
  2. Now, use different devices to test the webpage.
    • Using PC (any browser), it should be traced as mouseevents
    • Using i-device, it should be traced as touchevents
    • Using Android 2.3.X (any browser), it should be traced as touchevents
  3. Try it with ICS. Here is my problem:
    • Using Android ICS' Chrome browser, it is traced as touchevents. (Fine)
    • Using Android ICS' default browser, it is traced as mouseevents. (What The!!)

Even worse, in my ICS device (default browser):

  • The touchevents are never fired in my ICS' default browser. If I touch the webpage, it shows mousedown/mousemove.
  • The devices do support creating touchevents (document.createEvent), which is a lie.
  • The mouseevents sequences are not completed. So, even if my code supports both mouseevents and touchevents, the mouseevent functions still cannot support this ICS device.