iFrames and Touch Events

Originator:waynepan
Number:rdar://6089245 Date Originated:20-Jul-2008 01:28 PM
Status:Open Resolved:
Product:iPhone Product Version:2.x
Classification: Reproducible:Yes
 
20-Jul-2008 01:28 PM Wayne Pan:
Summary: 
Touch events in iFrames do not register unless certain conditions are met.

Steps to Reproduce:
I've set up the tests here:
- http://waynepan.com/iphone/touchtest.html
- http://waynepan.com/iphone/touchtest2.html
(iframe source: http://waynepan.com/iphone/if.html)

1) set up a parent document with a  'touchstart' event handler
2) set up an iframe ~100px down on the page within this document with a touch start event handler.
3) touch the iframe, no touch event is registered
4) touch the parent document, then touch the iframe, event is registered
5) move the iframe to the top of the parent doucment, touch events are now registered.

Expected Results:
Touch events are always registered with the iframe

Actual Results: 
iframe touch events are only registered when parent documents are touched or iframe is within the top ~100px of the document.

Regression:
Not tested with previous versions of the SDK releases.

Notes:



20-Jul-2008 04:07 PM Wayne Pan:
I've added another test, 
http://waynepan.com/iphone/touchtest3.html

In this test I've added a touchend event handler to the iframe. If you touch the parent document first, then all subsequent touches to the iframe are registered UNTIL a user double taps.

Steps:
0) load page
1) touch iframe, no touch event triggered
2) touch parent, then touch iframe multiple times. Different than [ http://waynepan.com/iphone/touchtest.html ] where only touches immediately after touching the parent are registered.
3) double tap the page, now iframe no longer gets touch events again.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!