Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Touch events in event.touches array switch position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Touch events in event.touches array switch position



On Sep 18, 2008, at 4:19 AM, email@hidden wrote:

I'm oberserving some weired behaviour when using the Mobile Safari
touch events. I'm giving an example:

I've registered a "touchstart" event handler for the document:
document.addEventListener('touchstart', touch_handler, true);

In my handler, I'm analyzing the touches list of the event. When only
one finger is involved, I can find the touch event in

event.touches[0] // --> first finger

But when 2 fingers are used sometimes (but sometimes not) the position
of the touch events in the touches array switch, meaning sometimes
it's

event.touches[0] // --> first finger
event.touches[1] // --> second finger

which is what I would consider correct behaviour, but sometimes the
touches array looks like

event.touches[0] // --> second finger
event.touches[1] // --> first finger

I've got no idea what causes the switch. I don't even know if this
behaviour is considered to be correct (my personal opinion is that the
indexes should be consistent for the life time of the event) and I
should deal with it or if it is a bug.

If you determine how to reproduce it, please file a bug using <http://developer.apple.com/bugreporter/ > with steps to reproduce and attach the test case. Thanks!


Dave

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Safari-iPhone-Web-Dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Touch events in event.touches array switch position (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.