IFRAME CSS3 zoom problem on iPad Safari (iOS 5.0.1)

I need to expand an iframe to make it bigger (I can’t control the source code of the iframe content). I tried to achieve it through the -webkit-transform: scale(1.3) CSS property.

The content of the iframe is enlarged correctly, but when I try to touch any control in the iframe, it seems that the touch event is received in the wrong position (I can see the “shadow” of the control in the wrong Place touch). As a result, the event handlers are not working (I suspect they are not called because the touch was detected in the wrong place). Has anyone encountered this problem? Can it be solved?

I created a test case that caused the problem (try it in iPad Safari): http://jsfiddle.net/9vem2/

In a more readable format Source:

Parent page (iframe container):




Parent





Parent




Child page( iframe content):




Child< br />


Child





This feels like a hack’s solution, but since it is being fixed it seems to be a bug, I guess it doesn’t matter. Instead of zooming in 2D, I The iframe has been moved into 3D, facing the viewer, please refer to this demo: http://jsfiddle.net/ianlunn /MSUmS/

< body> is made into 3D space, like this:

body {
-webkit-perspective : 800px;
}

Then, the iframe moves along the Z axis in the 3D space for the observer:

iframe {
-webkit-transform: translateZ(130px);
)

This may require modifications to real-world applications, especially if the iframe is contained in

I need to extend an iframe to make it bigger (I can’t control the source code of the iframe content). I tried to achieve it through the -webkit-transform:scale(1.3) CSS property.

The content of the iframe is enlarged correctly, but when I try to touch any control in the iframe, it seems that the touch event is received in the wrong place (I can see the “shadow” of the control is touched in the wrong place) As a result, the event handlers are not working (I suspect they are not called because the touch was detected in the wrong place). Has anyone encountered this problem? Can it be solved?

I created a test case that caused the problem (try it in iPad Safari): http://jsfiddle.net/9vem2/

In a more readable format Source:

Parent page (iframe container):




Parent





Parent




Child page( iframe content):




Child< br />


Child





This feels like a hack’s solution, but since it is being fixed it seems to be a bug, I guess it doesn’t matter. Instead of zooming in 2D, I have moved the iframe into 3D, towards the viewer, Please refer to this demo: http://jsfiddle.net/ianlunn/MSUmS/

< body> is made into a 3D space, like this:

bo dy {
-webkit-perspective: 800px;
}

Then, the iframe moves along the Z axis in the 3D space for the observer:

iframe {
-webkit-transform: translateZ(130px);
}

This may require modifications to the real world application, especially if the iframe contains In

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 954 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.