Closed GoogleCodeExporter closed 9 years ago
It looks like it is no longer true that touch events fire mouse events on
mobile browsers. I tested the following:
Chrome beta for android
Firefox beta for android
Android browser
Opera for android
Waiting for an update from an iPhone user. If mobile Safari has the same
behavior (just ontouchstart, no onmousedown), I'll put up a patch to modify
HtmlPointer.
Original comment by pdr@chromium.org
on 25 May 2012 at 1:41
iOS is different so this won't be as simple as I thought. Off to buy an iPad to
test this for real...
Original comment by pdr@google.com
on 25 May 2012 at 2:44
An excellent excuse! :)
Original comment by m...@samskivert.com
on 25 May 2012 at 3:44
Review request: Add mouse and touch listeners in Pointer, and a new test:
http://code.google.com/r/pdr-playn/source/detail?r=5c883b868997c6daeb1742626b87d
46b625a35eb&name=inputfix#
You can view it here (only modified to show the single test):
http://testtouch1.appspot.com
http://testtouch1.appspot.com/?renderer=canvas
Browser test results:
Safari Mobile: works as expected (!!!)
Chrome on Android: works as expected
Firefox Beta on Android: works as expected
Android browser: works as expected
Win7 with Chrome21 (--enable-touch-events) and touchscreen: fails with two
events on Touch due to crbug.com/129638. This is being fixed right now.
Our tricky preventDefault business in Pointer / Touch has the effect of always
preventing default for touch events (i.e., you can't pinch-zoom). I'm not a fan
of this but it does mean that everything works as expected and nobody regresses
from this change.
Useful page for playing with touch events: http://www.rbyers.net/eventTest.html
(note: prevent default "PD" checkbox is on by default).
Original comment by pdr@chromium.org
on 26 May 2012 at 1:50
LGTM. Do you mind if I merge this patch? I just refactored the Touch code to
add support for per-layer Touch listeners and in the process I factored a bunch
of repeated code out of HtmlTouch, so it would be easier for me to replicate
your change (enable both sets of listeners) after that merge rather than
replicate my change after.
Original comment by m...@samskivert.com
on 26 May 2012 at 7:38
SGTM!
Original comment by pdr@chromium.org
on 26 May 2012 at 7:49
Oh, wait, nevermind. My changes were to HtmlTouch, not HtmlPointer. Your patch
merges totally cleanly, so you might as well just pull the latest bits into
your repository and then merge this branch into your master and push it
upstream. No need for my meddling. :)
Original comment by m...@samskivert.com
on 26 May 2012 at 8:09
Oh, wait, nevermind. My changes were to HtmlTouch, not HtmlPointer. Your patch
merges totally cleanly, so you might as well just pull the latest bits into
your repository and then merge this branch into your master and push it
upstream. No need for my meddling. :)
Original comment by m...@samskivert.com
on 26 May 2012 at 8:16
Got delayed by beautiful vacation weather. Landing in just a few.
Original comment by pdr@chromium.org
on 30 May 2012 at 12:27
Thanks for the review!
We've landed:
http://code.google.com/p/playn/source/detail?r=9ce53a9910c38f242f79d5f8226685658
35cd6a6#
I'm going to mark this as fixed. If anyone runs into issues with this, please
create a new bug and assign it to me, or just re-open this bug.
Original comment by pdr@google.com
on 30 May 2012 at 1:04
Original issue reported on code.google.com by
pdr@google.com
on 25 May 2012 at 1:23