[ 
https://issues.apache.org/jira/browse/CB-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13995933#comment-13995933
 ] 

Kristoffer Hepler commented on CB-4323:
---------------------------------------

The device-height and device-width meta attributes are not an issue when a 
project targets both iPad and iPhone devices (aka "Universal" apps).  Removing 
them did cause content in my application to sometimes reside outside the screen 
with no way to scroll to it.

The problem is that the <html> element eventually grew larger than the WebView, 
i.e. on 4in iPhone iOS 7 devices the WebView is 1136 pixels tall while the 
<html> element grew to more than 1656 pixels tall, and so the bottom 520 pixels 
resided offscreen.  I need the <html> element fixed to the exact size of the 
screen for layout.  I don't see how I could compute the screen dimensions 
without device-height and device-width and still support all the varied Android 
resolutions.

I suspect my specific issue is related to having a scrolling <div> nested 
inside a <div> with style="overflow: hidden", but neither overflow nor 
scrolling attributes are applied on the <body> or <html> elements.  I would 
expect the WebView to scroll given that the <html> and <body> elements are 
larger than the WebView.  I'm at a loss to explain this behavior.

I had removed the device-height as per the upgrade recommendations.  Because 
the scrolling issue was not immediately apparent, I spent quite a lot of time 
tracking down the cause.  Perhaps the recommendation to remove the meta 
attributes should at least be conditional on targeting only iPhone devices, as 
it works fine for universal apps?

> IOS 7, target iphone, install on ipad, window height and width are of ipad, 
> not the iphone
> ------------------------------------------------------------------------------------------
>
>                 Key: CB-4323
>                 URL: https://issues.apache.org/jira/browse/CB-4323
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.7.0, 2.8.0, 3.0.0
>         Environment: ios7 ipad, app must only target iphone, not ipad
>            Reporter: Tom Wilson
>            Assignee: Shazron Abdullah
>            Priority: Critical
>              Labels: ios7
>             Fix For: 3.1.0
>
>
> IOS 7, target iphone, install on ipad, window height and width are of ipad, 
> not the iphone.
> See screen shot, the window height and width are 1080x768 and they should be 
> the iphone size.  This causes the window to overlap the iphone container 
> screen.
> This is only present in ios7, ios6 works fine.
> Screenshot...
> http://i.imgur.com/zIJNetJ.png
> See window height and width calculations from $("body").height() and 
> $("body").width() 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to