Android Webview multitouch touchstart event not working with more than 2 fingers
Asked Answered
C

1

11

Consider the following code:

canvas.addEventListener('touchstart', function(event) {
    console.log('start');
});

When I tap with 2 fingers at the same time I have the following output (which is cool because is printed two times):

I/SnapScrollController(26508): setSnapScrollingMode case-default no-op
I/chromium(26508): [INFO:CONSOLE(69)] "start", source: file:///android_asset/index.html (69)
I/chromium(26508): [INFO:CONSOLE(69)] "start", source: file:///android_asset/index.html (69)

But when I use more than 2 fingers at the same time I had the same result, what am I doing wrong? I was expected the log "start" as many times as fingers I was using.

In the other side touchmove and touchend works well.

I have uploaded the code here

Colombes answered 5/7, 2015 at 22:11 Comment(6)
It is posible get 3 or more touches??Colombes
what happens if you log event.touches.length in your touchstart and touchmove event handlers? The problem might be that when you put our third finger down, you move one of the already touching fingers and cause the system to change to "moving" mode so it fires off touchmove events from then on.Maggiore
@EdBallot I already have test when I place on the screen 2 fingers (at the same tine) and then one more, the result is the next fingers is printing their logs. My problem is I want to catch all 3,4 or 5 touchStartEvent placing fingers on the screen at same time. I update the question uploading code.Colombes
thanks for the clarification. What I saw testing with snappymaria.com/misc/TouchEventTest_v2.html on an ipad and a galaxyS5 is that both support >2 touch points in touchstart. On that page, it shows the length of event.touches so it would should something like "touch start 2" "touch start 3" indicating that the first touchstart picked up my first two fingers and the second picked up the third finger.Maggiore
@EdBallot Thanks to you:) You are right, I have test it on Sony Z2 and works well, but on my HTC One don't :(Colombes
I finally solved, its a misconfiguration on my device.Colombes
C
0

The problem was on my HTC One device. Just turning on Magnification Gestures my device start to catch all events triggered with my fingers(more than two)

enter image description here

Colombes answered 12/7, 2015 at 14:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.