You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Shazron <sh...@gmail.com> on 2013/09/13 20:13:10 UTC

meta tag viewport bug(?) in iOS 7

issue: https://issues.apache.org/jira/browse/CB-4323

I think it's an Apple bug because it appears if you have an iPhone app in
an iPad, it thinks device-width and device-height is the dimensions of the
iPad, when it is supposed to be iPhone sized.

An option is removing the width and height attributes from the
app-hello-world template since it doesn't appear to affect the layout on
anything if removed (but fixes this alleged Apple bug) - but if it's an
Apple bug, I think just a note in the HTML or some other doc will suffice

Re: meta tag viewport bug(?) in iOS 7

Posted by Michael Brooks <mi...@michaelbrooks.ca>.
device-height is used for some older BlackBerry devices (5 and 6 perhaps).
When the page is shorter than the viewport, it will collapse the browser
view. Settings the device-height fixes this issue.

device-width is used to prevent horizontal scrolling on some devices.

target-densitydpi, while deprecated, is critical for older Android devices
to render the image correctly.

I'm all for simplifying the viewport properties, HOWEVER, do proper testing
first. Many of these rules are required for older devices and operating
systems, such as BlackBerry 5, 6, and 7, Android 2.x, and Windows Phone 7.
If you remove a property, test it thoroughly first. Not just on the most
modern devices and operating systems.

I have to apologize for not documenting why each of the viewport properties
are required. It was a tricky combination.


On Fri, Sep 13, 2013 at 11:38 AM, Shazron <sh...@gmail.com> wrote:

> Unfortunately not removing device-width makes the bug surface. I think for
> now a note in the HTML and our upgrading docs should suffice.
>
>
> On Fri, Sep 13, 2013 at 11:30 AM, Andrew Grieve <agrieve@chromium.org
> >wrote:
>
> > device-height we should definitely remove. I think there were previous
> > discussions about how that messes up apps.
> >
> > device-width I'd be a bit worried about it introducing horizontal
> > scrolling, so we should be sure to test on all platforms.
> >
> > I'd also think target-densitydpi we'd want removed. It's pretty much
> never
> > useful to use device pixels on retina devices.
> >
> >
> > On Fri, Sep 13, 2013 at 2:13 PM, Shazron <sh...@gmail.com> wrote:
> >
> > > issue: https://issues.apache.org/jira/browse/CB-4323
> > >
> > > I think it's an Apple bug because it appears if you have an iPhone app
> in
> > > an iPad, it thinks device-width and device-height is the dimensions of
> > the
> > > iPad, when it is supposed to be iPhone sized.
> > >
> > > An option is removing the width and height attributes from the
> > > app-hello-world template since it doesn't appear to affect the layout
> on
> > > anything if removed (but fixes this alleged Apple bug) - but if it's an
> > > Apple bug, I think just a note in the HTML or some other doc will
> suffice
> > >
> >
>

Re: meta tag viewport bug(?) in iOS 7

Posted by Shazron <sh...@gmail.com>.
Unfortunately not removing device-width makes the bug surface. I think for
now a note in the HTML and our upgrading docs should suffice.


On Fri, Sep 13, 2013 at 11:30 AM, Andrew Grieve <ag...@chromium.org>wrote:

> device-height we should definitely remove. I think there were previous
> discussions about how that messes up apps.
>
> device-width I'd be a bit worried about it introducing horizontal
> scrolling, so we should be sure to test on all platforms.
>
> I'd also think target-densitydpi we'd want removed. It's pretty much never
> useful to use device pixels on retina devices.
>
>
> On Fri, Sep 13, 2013 at 2:13 PM, Shazron <sh...@gmail.com> wrote:
>
> > issue: https://issues.apache.org/jira/browse/CB-4323
> >
> > I think it's an Apple bug because it appears if you have an iPhone app in
> > an iPad, it thinks device-width and device-height is the dimensions of
> the
> > iPad, when it is supposed to be iPhone sized.
> >
> > An option is removing the width and height attributes from the
> > app-hello-world template since it doesn't appear to affect the layout on
> > anything if removed (but fixes this alleged Apple bug) - but if it's an
> > Apple bug, I think just a note in the HTML or some other doc will suffice
> >
>

Re: meta tag viewport bug(?) in iOS 7

Posted by Andrew Grieve <ag...@chromium.org>.
device-height we should definitely remove. I think there were previous
discussions about how that messes up apps.

device-width I'd be a bit worried about it introducing horizontal
scrolling, so we should be sure to test on all platforms.

I'd also think target-densitydpi we'd want removed. It's pretty much never
useful to use device pixels on retina devices.


On Fri, Sep 13, 2013 at 2:13 PM, Shazron <sh...@gmail.com> wrote:

> issue: https://issues.apache.org/jira/browse/CB-4323
>
> I think it's an Apple bug because it appears if you have an iPhone app in
> an iPad, it thinks device-width and device-height is the dimensions of the
> iPad, when it is supposed to be iPhone sized.
>
> An option is removing the width and height attributes from the
> app-hello-world template since it doesn't appear to affect the layout on
> anything if removed (but fixes this alleged Apple bug) - but if it's an
> Apple bug, I think just a note in the HTML or some other doc will suffice
>