Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#16108 closed defect (fixed)

dojo/touch: on iOS6, the synthetic touch.move event misses all event's properties

Reported by: Adrian Vasiliu Owned by: bill
Priority: blocker Milestone: 1.7.7
Component: Events Version: 1.8.0
Keywords: ios6 Cc: bill
Blocked By: Blocking:

Description

For "touchmove" native events, dojo/touch creates a synthetic touch.move event. Now, the trouble is that, in iOS6, all the properties of the native touchmove event are missing from the synthetic event, while they are available when running on iOS 4 and 5.

Reproduced on iPhone 4S under iOS 6 (6.0), using any recent Dojo version (initial 1.8, 1.8-patch or trunk).

The attached test_bug-synthetic-event-ios6.html is a simple test case which demonstrates the difference of behavior on iOS6 vs. iOS4 or 5. How to reproduce:

  1. Run the test on iOS 4 or 5.
  2. Follow the indication written in the app itself (touch and move over the blue upper area, and check the log written in the white scrollable area).

=> You can see in the lower part of the window the log traces for three events: a touch.press, a touch.move, and a synthetic touch.move. For all these events, all the properties of the event are NOT undefined. So far so good.

  1. Run the same test on an iOS6 device.

=> All the properties present on the native mousemove event are now undefined for the synthetic touch.move (and only for this event).

This is a follow-up of #16090, which holds only for the "touches" property of the event and is fixed in Dojo 1.8.1.

Attachments (2)

test_bug-synthetic-event-ios6.html (2.9 KB) - added by Adrian Vasiliu 7 years ago.
Test case demonstrating that, on iOS6, the properties of the native touchmove event are missing from the synthetic touch.move events
fix_synthetic-event-ios6.patch (2.5 KB) - added by Adrian Vasiliu 7 years ago.
Fix for iOS6: make the properties of the native "mousemove" event available on the synthetic touch.move - Adrian Vasiliu, IBM, CCLA

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by Adrian Vasiliu

Test case demonstrating that, on iOS6, the properties of the native touchmove event are missing from the synthetic touch.move events

Changed 7 years ago by Adrian Vasiliu

Fix for iOS6: make the properties of the native "mousemove" event available on the synthetic touch.move - Adrian Vasiliu, IBM, CCLA

comment:1 Changed 7 years ago by cjolif

Keywords: ios6 added

comment:2 Changed 7 years ago by cjolif

Milestone: tbd1.8.2

comment:3 Changed 6 years ago by cjolif

Cc: bill added

comment:4 Changed 6 years ago by Adrian Vasiliu

iOS 6.0.1 is now out, and at a quick testing it appears the issue is still there. So the fix on our side is still useful (and still works).

Last edited 6 years ago by Adrian Vasiliu (previous) (diff)

comment:5 Changed 6 years ago by Adrian Vasiliu

The same holds for Safari included in iOS 6.1 beta (tested using the simulator).

comment:6 Changed 6 years ago by bill

Owner: changed from Kris Zyp to bill
Status: newassigned

Colin suggested using Object.getOwnPropertyNames() if available, rather than lang.mixin(). I'll try that.

The documentation for touch.move also needs to be updated. It says it registers a "touchmove" listener but what it does is actually quite different than that because of when the event fires, which is when the finger is over the specified node, not when the finger started on the specified node.

comment:7 Changed 6 years ago by bill

Priority: undecidedblocker

comment:8 Changed 6 years ago by bill

This problem stems from trying to make a copy of the event, which triggers the iOS6 bug mentioned above. I thought that making a copy was necessary because:

  1. if I didn't make a copy I couldn't reset evt.target
  2. Resetting evt.target would affect listeners to the native "touchmove" event

However, my tests now show neither of those things to be problems. So I want to just remove the copying altogether. I'll check that into trunk, and if the change is working for you too then I'll backport it to 1.8.

comment:9 Changed 6 years ago by bill

In [30073]:

Don't make copy of event object. It appears to be unnecessary, and it triggers an iOS6 bug with properties in the event object being marked as non-enumerable. Refs #16108, #16090 !strict.

comment:18 Changed 6 years ago by bill

Resolution: fixed
Status: assignedclosed

In [30095]:

Don't make copy of event object. It appears to be unnecessary, and it triggers an iOS6 bug with properties in the event object being marked as non-enumerable. Fixes #16108, #16090 on 1.8/ branch !strict.

comment:19 Changed 5 years ago by bill

Milestone: 1.8.21.7.7

Backported to 1.7 in e7403082d02faba2e47cb645d2532dd2920f60b8.

Note: See TracTickets for help on using tickets.